diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-01-23 18:52:29 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-02-04 10:49:07 +0100 |
commit | 704b3719f5acfe2291c5976bf8c0935bb9523f5a (patch) | |
tree | 3cab33639d9edcc3df676e68e6acd7027d78e6a6 /src | |
parent | a67219ab8bf9e03b3365cd8612f5c40a64392e40 (diff) | |
download | qtlocation-mapboxgl-704b3719f5acfe2291c5976bf8c0935bb9523f5a.tar.gz |
use standard DEBUG macro rather than NDEBUG
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/map/map.cpp | 10 | ||||
-rw-r--r-- | src/mbgl/util/uv-worker.c | 8 | ||||
-rw-r--r-- | src/mbgl/util/uv-worker.h | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index d76023c8fb..5aff7a2b78 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -59,7 +59,7 @@ using namespace mbgl; Map::Map(View& view_, FileSource& fileSource_) : loop(util::make_unique<uv::loop>()), view(view_), -#ifndef NDEBUG +#ifdef DEBUG mainThread(std::this_thread::get_id()), mapThread(mainThread), #endif @@ -152,7 +152,7 @@ void Map::start(bool startPaused) { } thread = std::thread([this]() { -#ifndef NDEBUG +#ifdef DEBUG mapThread = std::this_thread::get_id(); #endif @@ -162,7 +162,7 @@ void Map::start(bool startPaused) { run(); -#ifndef NDEBUG +#ifdef DEBUG mapThread = std::thread::id(); #endif @@ -230,7 +230,7 @@ void Map::resume() { void Map::run() { if (mode == Mode::None) { -#ifndef NDEBUG +#ifdef DEBUG mapThread = mainThread; #endif mode = Mode::Static; @@ -265,7 +265,7 @@ void Map::run() { // *after* all events have been processed. if (mode == Mode::Static) { render(); -#ifndef NDEBUG +#ifdef DEBUG mapThread = std::thread::id(); #endif mode = Mode::None; diff --git a/src/mbgl/util/uv-worker.c b/src/mbgl/util/uv-worker.c index d2aa908019..ec8eae461c 100644 --- a/src/mbgl/util/uv-worker.c +++ b/src/mbgl/util/uv-worker.c @@ -25,7 +25,7 @@ void uv__worker_free_messenger(uv_messenger_t *msgr) { void uv__worker_thread_finished(uv__worker_thread_t *worker_thread) { uv_worker_t *worker = worker_thread->worker; -#ifndef NDEBUG +#ifdef DEBUG assert(uv_thread_self() == worker->thread_id); #endif @@ -101,7 +101,7 @@ void uv__worker_thread_loop(void *ptr) { } int uv_worker_init(uv_worker_t *worker, uv_loop_t *loop, int count, const char *name) { -#ifndef NDEBUG +#ifdef DEBUG worker->thread_id = uv_thread_self(); #endif worker->loop = loop; @@ -134,7 +134,7 @@ int uv_worker_init(uv_worker_t *worker, uv_loop_t *loop, int count, const char * void uv_worker_send(uv_worker_t *worker, void *data, uv_worker_cb work_cb, uv_worker_after_cb after_work_cb) { -#ifndef NDEBUG +#ifdef DEBUG assert(uv_thread_self() == worker->thread_id); #endif @@ -155,7 +155,7 @@ void uv_worker_send(uv_worker_t *worker, void *data, uv_worker_cb work_cb, } void uv_worker_close(uv_worker_t *worker, uv_worker_close_cb close_cb) { -#ifndef NDEBUG +#ifdef DEBUG assert(uv_thread_self() == worker->thread_id); #endif diff --git a/src/mbgl/util/uv-worker.h b/src/mbgl/util/uv-worker.h index cb2075d1c3..5640bfd14d 100644 --- a/src/mbgl/util/uv-worker.h +++ b/src/mbgl/util/uv-worker.h @@ -17,7 +17,7 @@ typedef void (*uv_worker_after_cb)(void *data); typedef void (*uv_worker_close_cb)(uv_worker_t *worker); struct uv_worker_s { -#ifndef NDEBUG +#ifdef DEBUG unsigned long thread_id; #endif uv_loop_t *loop; |