diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-10-22 15:13:35 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-10-22 15:13:35 +0200 |
commit | 253bbd1c5b5c5ae4a7bdbf731f58efa08d8cf855 (patch) | |
tree | 24b9c20ad564f3dd991fbcd5570aa6c4f2d81f6a /include | |
parent | d54809b04adf0b64e13b97852cfed860f92682a9 (diff) | |
parent | 251fafe2bf6dff34868a4e32953adcb73cb20db6 (diff) | |
download | qtlocation-mapboxgl-253bbd1c5b5c5ae4a7bdbf731f58efa08d8cf855.tar.gz |
New mason-based build system
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/map/map.hpp | 7 | ||||
-rw-r--r-- | include/mbgl/platform/event.hpp | 1 | ||||
-rw-r--r-- | include/mbgl/text/collision.hpp | 1 | ||||
-rw-r--r-- | include/mbgl/util/uv-worker.h | 3 | ||||
-rw-r--r-- | include/mbgl/util/uv_detail.hpp | 20 |
5 files changed, 25 insertions, 7 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index a69943aa74..bea82e6b4c 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -143,10 +143,15 @@ public: private: // uv async callbacks +#if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10 + static void render(uv_async_t *async, int status); + static void terminate(uv_async_t *async, int status); + static void cleanup(uv_async_t *async, int status); +#else static void render(uv_async_t *async); static void terminate(uv_async_t *async); static void cleanup(uv_async_t *async); - static void delete_async(uv_handle_t *handle); +#endif // Setup void setup(); diff --git a/include/mbgl/platform/event.hpp b/include/mbgl/platform/event.hpp index 576e9e5b85..2aa4aa0c95 100644 --- a/include/mbgl/platform/event.hpp +++ b/include/mbgl/platform/event.hpp @@ -65,7 +65,6 @@ constexpr EventSeverity disabledEventSeverities[] = { #endif }; - constexpr Event disabledEvents[] = { Event(-1) // Avoid zero size array }; diff --git a/include/mbgl/text/collision.hpp b/include/mbgl/text/collision.hpp index 8eec30f216..b7ee6b4520 100644 --- a/include/mbgl/text/collision.hpp +++ b/include/mbgl/text/collision.hpp @@ -5,6 +5,7 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-variable" #ifdef __clang__ #pragma GCC diagnostic ignored "-Wdeprecated-register" #else diff --git a/include/mbgl/util/uv-worker.h b/include/mbgl/util/uv-worker.h index 451b6fb04d..cb2075d1c3 100644 --- a/include/mbgl/util/uv-worker.h +++ b/include/mbgl/util/uv-worker.h @@ -5,8 +5,7 @@ extern "C" { #endif -typedef struct uv_messenger_s uv_messenger_t; - +#include <mbgl/util/uv-messenger.h> #include <mbgl/util/uv-channel.h> #include <stdlib.h> diff --git a/include/mbgl/util/uv_detail.hpp b/include/mbgl/util/uv_detail.hpp index e0a57ce65d..f80ca1bff5 100644 --- a/include/mbgl/util/uv_detail.hpp +++ b/include/mbgl/util/uv_detail.hpp @@ -24,17 +24,31 @@ private: class loop { public: inline loop() { +#if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10 + l = uv_loop_new(); + if (l == nullptr) { +#else + l = new uv_loop_t; if (uv_loop_init(&l) != 0) { +#endif throw std::runtime_error("failed to initialize loop"); } } - inline ~loop() { uv_loop_close(&l); } + inline ~loop() { +#if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10 + uv_loop_delete(l); +#else + uv_loop_close(l); + delete l; +#endif + + } - inline uv_loop_t *operator*() { return &l; } + inline uv_loop_t *operator*() { return l; } private: - uv_loop_t l; + uv_loop_t *l = nullptr; }; class mutex { |