diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-07-21 12:45:47 +0300 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-08-05 11:42:22 +0200 |
commit | 3ae506ee1301bcc3f9961a9282f710b8b7fa8039 (patch) | |
tree | 225b86322734f372a8d24c1c24ffa187aff4febd /include | |
parent | 57bed88b03e87344712800f8fbe796f81a00fc16 (diff) | |
download | qtlocation-mapboxgl-3ae506ee1301bcc3f9961a9282f710b8b7fa8039.tar.gz |
[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.
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/gl/gl.hpp | 2 | ||||
-rw-r--r-- | include/mbgl/platform/event.hpp | 2 | ||||
-rw-r--r-- | include/mbgl/util/util.hpp | 2 |
3 files changed, 3 insertions, 3 deletions
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) diff --git a/include/mbgl/platform/event.hpp b/include/mbgl/platform/event.hpp index ee1ce6fa4e..7ad3d914e8 100644 --- a/include/mbgl/platform/event.hpp +++ b/include/mbgl/platform/event.hpp @@ -40,7 +40,7 @@ struct EventPermutation { }; constexpr EventSeverity disabledEventSeverities[] = { -#if DEBUG +#ifdef NDEBUG EventSeverity(-1) // Avoid zero size array #else EventSeverity::Debug diff --git a/include/mbgl/util/util.hpp b/include/mbgl/util/util.hpp index df8613ab70..c5a7cb3780 100644 --- a/include/mbgl/util/util.hpp +++ b/include/mbgl/util/util.hpp @@ -1,6 +1,6 @@ #pragma once -#ifdef DEBUG +#ifndef NDEBUG #include <thread> #define MBGL_STORE_THREAD(tid) const std::thread::id tid = std::this_thread::get_id(); |