1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 09:05:19 +02: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())