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:
committed by
Lars Müller
parent
2f464843cb
commit
5f1ff453c9
@@ -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())
|
||||
|
Reference in New Issue
Block a user