1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +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

@ -11,6 +11,7 @@
#include <cstdio>
#include <cstring>
#include <cwchar>
#include <cassert>
/* HACK: import these string methods from MT's util/string.h */
extern std::wstring utf8_to_wide(std::string_view input);
@ -174,9 +175,9 @@ public:
}
if constexpr (sizeof(T) != sizeof(B)) {
_IRR_DEBUG_BREAK_IF(
(uintptr_t)c >= (uintptr_t)(str.data()) &&
(uintptr_t)c < (uintptr_t)(str.data() + str.size()));
assert(
(uintptr_t)c < (uintptr_t)(str.data()) ||
(uintptr_t)c >= (uintptr_t)(str.data() + str.size()));
}
if ((void *)c == (void *)c_str())