summaryrefslogtreecommitdiff
path: root/include/mbgl/util/uv_detail.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-09-16 16:38:32 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-09-24 16:14:09 +0200
commitf26bb724dc164b69b5358f30c6248fdf5cbd076b (patch)
tree4c719a97ff02c86a22bcdcec6fc0f781c3bcd3e9 /include/mbgl/util/uv_detail.hpp
parent6c526e56370a0f4dee9a4b6ed45489fcb14e3ff1 (diff)
downloadqtlocation-mapboxgl-f26bb724dc164b69b5358f30c6248fdf5cbd076b.tar.gz
use util::ptr as a wrapper around std::shared_ptr that asserts nonemptiness
Diffstat (limited to 'include/mbgl/util/uv_detail.hpp')
-rw-r--r--include/mbgl/util/uv_detail.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/mbgl/util/uv_detail.hpp b/include/mbgl/util/uv_detail.hpp
index eefb5ac8df..272ca41495 100644
--- a/include/mbgl/util/uv_detail.hpp
+++ b/include/mbgl/util/uv_detail.hpp
@@ -1,6 +1,8 @@
#ifndef MBGL_UTIL_UV_DETAIL
#define MBGL_UTIL_UV_DETAIL
+#include <mbgl/util/ptr.hpp>
+
#include <uv.h>
#include <functional>
@@ -113,7 +115,7 @@ public:
typedef void (*after_work_callback)(T &object);
template<typename... Args>
- work(const std::shared_ptr<loop> &loop, work_callback work_cb, after_work_callback after_work_cb, Args&&... args)
+ work(const mbgl::util::ptr<loop> &loop, work_callback work_cb, after_work_callback after_work_cb, Args&&... args)
: loop(loop),
data(std::forward<Args>(args)...),
work_cb(work_cb),
@@ -135,7 +137,7 @@ private:
}
private:
- std::shared_ptr<uv::loop> loop;
+ mbgl::util::ptr<uv::loop> loop;
uv_work_t req;
T data;
work_callback work_cb;