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