From f26bb724dc164b69b5358f30c6248fdf5cbd076b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Tue, 16 Sep 2014 16:38:32 +0200 Subject: use util::ptr as a wrapper around std::shared_ptr that asserts nonemptiness --- include/mbgl/util/uv_detail.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/mbgl/util/uv_detail.hpp') 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 + #include #include @@ -113,7 +115,7 @@ public: typedef void (*after_work_callback)(T &object); template - work(const std::shared_ptr &loop, work_callback work_cb, after_work_callback after_work_cb, Args&&... args) + work(const mbgl::util::ptr &loop, work_callback work_cb, after_work_callback after_work_cb, Args&&... args) : loop(loop), data(std::forward(args)...), work_cb(work_cb), @@ -135,7 +137,7 @@ private: } private: - std::shared_ptr loop; + mbgl::util::ptr loop; uv_work_t req; T data; work_callback work_cb; -- cgit v1.2.1