From 3ae506ee1301bcc3f9961a9282f710b8b7fa8039 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Thu, 21 Jul 2016 12:45:47 +0300 Subject: [core] Use NDEBUG instead of DEBUG CMake defines 'NDEBUG' by default for release build, so we can check if that's not defined instead of using 'DEBUG' for debug build. --- include/mbgl/gl/gl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/mbgl/gl') diff --git a/include/mbgl/gl/gl.hpp b/include/mbgl/gl/gl.hpp index d033fef549..285f1ff3ba 100644 --- a/include/mbgl/gl/gl.hpp +++ b/include/mbgl/gl/gl.hpp @@ -66,7 +66,7 @@ struct Error : ::std::runtime_error { void checkError(const char *cmd, const char *file, int line); -#if defined(DEBUG) +#ifndef NDEBUG #define MBGL_CHECK_ERROR(cmd) ([&]() { struct __MBGL_C_E { ~__MBGL_C_E() { ::mbgl::gl::checkError(#cmd, __FILE__, __LINE__); } } __MBGL_C_E; return cmd; }()) #else #define MBGL_CHECK_ERROR(cmd) (cmd) -- cgit v1.2.1