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:
parent
2f464843cb
commit
5f1ff453c9
22 changed files with 96 additions and 91 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue