Include: PoolAlloc: do not rely on CMake define
authorJohannes Kauffmann <19662702+JohannesKauffmann@users.noreply.github.com>
Wed, 23 Nov 2022 23:14:23 +0000 (00:14 +0100)
committerJeremy Hayes <jeremy-lunarg@users.noreply.github.com>
Tue, 29 Nov 2022 21:58:29 +0000 (14:58 -0700)
commit728c689574fba7e53305b475cd57f196c1a21226
treebdf67b318fa12ee76afe854a3ede5d44220abcef
parent12bb8602dd2ef450e064959eb44ae117a80f01c9
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.
glslang/Include/PoolAlloc.h