use standard DEBUG macro rather than NDEBUG

This commit is contained in:
Konstantin Käfer
2015-01-23 18:52:29 +01:00
parent a67219ab8b
commit 704b3719f5
11 changed files with 42 additions and 29 deletions

View File

@@ -198,7 +198,7 @@ private:
View &view;
#ifndef NDEBUG
#ifdef DEBUG
const std::thread::id mainThread;
std::thread::id mapThread;
#endif

View File

@@ -1,15 +1,17 @@
#ifndef MBGL_UTIL_UTIL
#define MBGL_UTIL_UTIL
#include <thread>
#ifdef DEBUG
#ifndef NDEBUG
#include <thread>
#define MBGL_STORE_THREAD(tid) const std::thread::id tid = std::this_thread::get_id();
#define MBGL_VERIFY_THREAD(tid) assert(tid == std::this_thread::get_id());
#else
#define MBGL_STORE_THREAD(tid)
#define MBGL_VERIFY_THREAD(tid)
#endif
#endif