summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/map/map.hpp8
-rw-r--r--include/mbgl/platform/request.hpp2
-rw-r--r--include/mbgl/util/uv_detail.hpp13
3 files changed, 9 insertions, 14 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index 0d2926d04b..ac33dba0ef 100644
--- a/include/mbgl/map/map.hpp
+++ b/include/mbgl/map/map.hpp
@@ -132,10 +132,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 {