summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Morris <michael.patrick.morris@gmail.com>2014-08-13 16:04:10 -0400
committerMike Morris <michael.patrick.morris@gmail.com>2014-08-13 16:04:53 -0400
commit6408e40a60be97555fe98a430f1ae81bd128f4f3 (patch)
treed5520466c1e91115b21e8c6b996d4678518c3f07 /include
parent8ab687b6c4cc9710e742e77463da58d050060a91 (diff)
downloadqtlocation-mapboxgl-6408e40a60be97555fe98a430f1ae81bd128f4f3.tar.gz
revert https://github.com/mapbox/mapbox-gl-native/commit/992815cc3da3a440dbc56c61925a4e5443b58073
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/util/uv_detail.hpp13
1 files changed, 4 insertions, 9 deletions
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 {