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

@ -9,6 +9,8 @@
#include "os.h"
#include "SoftwareDriver2_helper.h"
#include <cassert>
namespace irr
{
namespace video
@ -20,7 +22,7 @@ CImage::CImage(ECOLOR_FORMAT format, const core::dimension2d<u32> &size, void *d
IImage(format, size, deleteMemory)
{
if (ownForeignMemory) {
_IRR_DEBUG_BREAK_IF(!data)
assert(data);
Data = reinterpret_cast<u8*>(data);
if (reinterpret_cast<uintptr_t>(data) % sizeof(u32) != 0)
os::Printer::log("CImage created with foreign memory that's not aligned", ELL_WARNING);