diff options
Diffstat (limited to 'include/mbgl')
-rw-r--r-- | include/mbgl/map/map.hpp | 8 | ||||
-rw-r--r-- | include/mbgl/platform/request.hpp | 2 | ||||
-rw-r--r-- | include/mbgl/util/uv_detail.hpp | 13 |
3 files changed, 9 insertions, 14 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index fba38879ed..4c5952a2c1 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -129,10 +129,10 @@ public: private: // uv async callbacks - 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); + 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); + static void delete_async(uv_handle_t *handle, int status); // Setup void setup(); diff --git a/include/mbgl/platform/request.hpp b/include/mbgl/platform/request.hpp index 0cbacf645d..2a231769c1 100644 --- a/include/mbgl/platform/request.hpp +++ b/include/mbgl/platform/request.hpp @@ -24,7 +24,7 @@ public: void complete(); private: - static void complete(uv_async_t *async); + static void complete(uv_async_t *async, int status); public: const std::string url; diff --git a/include/mbgl/util/uv_detail.hpp b/include/mbgl/util/uv_detail.hpp index c65c247ba1..b3fdbb3719 100644 --- a/include/mbgl/util/uv_detail.hpp +++ b/include/mbgl/util/uv_detail.hpp @@ -31,18 +31,13 @@ private: class loop { public: - inline loop() { - if (uv_loop_init(&l) != 0) { - throw std::runtime_error("failed to initialize loop"); - } - } - - inline ~loop() { uv_loop_close(&l); } + inline loop() : l(uv_loop_new()) {} + inline ~loop() { uv_loop_delete(l); } - inline uv_loop_t *operator*() { return &l; } + inline uv_loop_t *operator*() { return l; } private: - uv_loop_t l; + uv_loop_t *l; }; class mutex { |