1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Replace _IRR_DEBUG_BREAK_IF with assertions

This commit is contained in:
Lars Mueller 2025-04-04 01:26:02 +02:00 committed by Lars Müller
parent 2f464843cb
commit 5f1ff453c9
22 changed files with 96 additions and 91 deletions

View file

@ -20,6 +20,7 @@
#include <array>
#include <cstddef>
#include <cstring>
#include <cassert>
#include <limits>
#include <memory>
#include <optional>
@ -797,7 +798,7 @@ std::optional<std::vector<u16>> SelfType::MeshExtractor::getIndices(
if (index == std::numeric_limits<u16>::max())
throw std::runtime_error("invalid index");
} else {
_IRR_DEBUG_BREAK_IF(!std::holds_alternative<Accessor<u32>>(accessor));
assert(std::holds_alternative<Accessor<u32>>(accessor));
u32 indexWide = std::get<Accessor<u32>>(accessor).get(elemIdx);
// Use >= here for consistency.
if (indexWide >= std::numeric_limits<u16>::max())