From b9e62b6fe5f4735bc900dcf50ebbceb8373da041 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Fri, 1 Mar 2024 12:00:01 +0300 Subject: [PATCH] use NDEBUG to check DEBUG mode --- include/cglm/io.h | 2 +- include/cglm/mat4.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/cglm/io.h b/include/cglm/io.h index d77368b..b95751b 100644 --- a/include/cglm/io.h +++ b/include/cglm/io.h @@ -38,7 +38,7 @@ #ifndef cglm_io_h #define cglm_io_h -#if defined(DEBUG) || defined(_DEBUG) \ +#if !defined(NDEBUG) \ || defined(CGLM_DEFINE_PRINTS) || defined(CGLM_LIB_SRC) \ || defined(CGLM_NO_PRINTS_NOOP) diff --git a/include/cglm/mat4.h b/include/cglm/mat4.h index 7f181d1..08310a4 100644 --- a/include/cglm/mat4.h +++ b/include/cglm/mat4.h @@ -69,7 +69,7 @@ # include "simd/wasm/mat4.h" #endif -#ifdef DEBUG +#ifndef NDEBUG # include #endif @@ -376,7 +376,7 @@ void glm_mat4_mulN(mat4 * __restrict matrices[], uint32_t len, mat4 dest) { uint32_t i; -#ifdef DEBUG +#ifndef NDEBUG assert(len > 1 && "there must be least 2 matrices to go!"); #endif