mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives
This commit is contained in:
parent
a603a76787
commit
ced6d20295
62 changed files with 299 additions and 294 deletions
|
@ -196,7 +196,7 @@ public:
|
|||
virtual void OnSetConstants(video::IMaterialRendererServices *services, s32 userData)
|
||||
{
|
||||
video::IVideoDriver *driver = services->getVideoDriver();
|
||||
assert(driver);
|
||||
sanity_check(driver != NULL);
|
||||
|
||||
bool is_highlevel = userData;
|
||||
|
||||
|
@ -219,7 +219,7 @@ public:
|
|||
bool is_highlevel)
|
||||
{
|
||||
video::IVideoDriver *driver = services->getVideoDriver();
|
||||
assert(driver);
|
||||
sanity_check(driver);
|
||||
|
||||
// set inverted world matrix
|
||||
core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD);
|
||||
|
@ -364,7 +364,7 @@ void load_shaders(std::string name, SourceShaderCache *sourcecache,
|
|||
ShaderSource::ShaderSource(IrrlichtDevice *device):
|
||||
m_device(device)
|
||||
{
|
||||
assert(m_device);
|
||||
assert(m_device); // Pre-condition
|
||||
|
||||
m_shader_callback = new ShaderCallback(this, "default");
|
||||
|
||||
|
@ -505,7 +505,7 @@ void ShaderSource::insertSourceShader(const std::string &name_of_shader,
|
|||
"name_of_shader=\""<<name_of_shader<<"\", "
|
||||
"filename=\""<<filename<<"\""<<std::endl;*/
|
||||
|
||||
assert(get_current_thread_id() == m_main_thread);
|
||||
sanity_check(get_current_thread_id() == m_main_thread);
|
||||
|
||||
m_sourcecache.insert(name_of_shader, filename, program, true);
|
||||
}
|
||||
|
@ -578,7 +578,7 @@ ShaderInfo generate_shader(std::string name, u8 material_type, u8 drawtype,
|
|||
return shaderinfo;
|
||||
|
||||
video::IVideoDriver* driver = device->getVideoDriver();
|
||||
assert(driver);
|
||||
sanity_check(driver);
|
||||
|
||||
video::IGPUProgrammingServices *gpu = driver->getGPUProgrammingServices();
|
||||
if(!gpu){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue