mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 12:00:05 +00:00
Include: PoolAlloc: do not rely on CMake define
On Windows, _DEBUG is defined by CMake if CMAKE_BUILD_TYPE is Debug. But on other platforms, this is not the case and thus in debug mode, the guard checks are not enabled. Instead, rely on the NDEBUG define, which is always defined in release mode (Release, RelWithDebInfo and MinSizeRel). This works reliably on all platforms: It is also used to enable or disable assertions.
This commit is contained in:
parent
12bb8602dd
commit
728c689574
@ -37,7 +37,7 @@
|
||||
#ifndef _POOLALLOC_INCLUDED_
|
||||
#define _POOLALLOC_INCLUDED_
|
||||
|
||||
#ifdef _DEBUG
|
||||
#ifndef NDEBUG
|
||||
# define GUARD_BLOCKS // define to enable guard block sanity checking
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user