From 9db5d2ac55de5cb96c41f0b0c1e88a9bc331449f Mon Sep 17 00:00:00 2001 From: Leith Bade Date: Wed, 3 Dec 2014 22:27:40 +1100 Subject: Remove boost::make_unique --- android/cpp/native_map_view.cpp | 5 ++--- platform/android/asset_request_baton_libzip.cpp | 7 +++---- platform/default/http_request_baton_curl.cpp | 3 +-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/android/cpp/native_map_view.cpp b/android/cpp/native_map_view.cpp index 1fef8551e7..58e11b425c 100644 --- a/android/cpp/native_map_view.cpp +++ b/android/cpp/native_map_view.cpp @@ -4,8 +4,6 @@ #include #include -#include - #include #include @@ -15,6 +13,7 @@ #include #include #include +#include namespace mbgl { namespace android { @@ -194,7 +193,7 @@ bool NativeMapView::initializeDisplay() { return false; } - const std::unique_ptr configs = boost::make_unique(num_configs); // switch to std::make_unique in C++14 + const std::unique_ptr configs = mbgl::util::make_unique(num_configs); if (!eglChooseConfig(display, config_attribs, configs.get(), num_configs, &num_configs)) { mbgl::Log::Error(mbgl::Event::OpenGL, "eglChooseConfig() returned error %d", eglGetError()); terminateDisplay(); diff --git a/platform/android/asset_request_baton_libzip.cpp b/platform/android/asset_request_baton_libzip.cpp index 1d2f055bfa..6508f469db 100644 --- a/platform/android/asset_request_baton_libzip.cpp +++ b/platform/android/asset_request_baton_libzip.cpp @@ -2,8 +2,7 @@ #include #include #include - -#include +#include #include // NOTE a bug in the Android NDK breaks std::errno @@ -28,7 +27,7 @@ void AssetRequestBaton::run(AssetRequestBaton *ptr) { if ((apk == nullptr) || ptr->canceled || !ptr->request) { // Opening the APK failed or was canceled. There isn't much left we can do. const int message_size = zip_error_to_str(nullptr, 0, error, errno); - const std::unique_ptr message = boost::make_unique(message_size); + const std::unique_ptr message = mbgl::util::make_unique(message_size); zip_error_to_str(message.get(), 0, error, errno); notify_error(ptr, 500, message.get()); cleanup(ptr); @@ -61,7 +60,7 @@ void AssetRequestBaton::run(AssetRequestBaton *ptr) { return; } - const std::unique_ptr data = boost::make_unique(stat.size); + const std::unique_ptr data = mbgl::util::make_unique(stat.size); if (static_cast(zip_fread(apk_file, reinterpret_cast(data.get()), stat.size)) != stat.size || ptr->canceled || !ptr->request) { // Reading failed or was canceled. We already have an open file handle diff --git a/platform/default/http_request_baton_curl.cpp b/platform/default/http_request_baton_curl.cpp index 9ddd5c501b..901ccbafd7 100644 --- a/platform/default/http_request_baton_curl.cpp +++ b/platform/default/http_request_baton_curl.cpp @@ -8,7 +8,6 @@ #ifdef __ANDROID__ #include #include - #include #include #endif @@ -447,7 +446,7 @@ static CURLcode sslctx_function(CURL */*curl*/, void *sslctx, void */*parm*/) { return CURLE_SSL_CACERT_BADFILE; } - const std::unique_ptr pem = boost::make_unique(stat.size); + const std::unique_ptr pem = util::make_unique(stat.size); if (static_cast(zip_fread(apk_file, reinterpret_cast(pem.get()), stat.size)) != stat.size) { zip_fclose(apk_file); -- cgit v1.2.1