diff options
author | Leith Bade <leith@mapbox.com> | 2014-12-03 22:27:40 +1100 |
---|---|---|
committer | Leith Bade <leith@mapbox.com> | 2014-12-03 22:27:40 +1100 |
commit | 9db5d2ac55de5cb96c41f0b0c1e88a9bc331449f (patch) | |
tree | 685cb0f0ec5d9e7b3a16171d74736d39cc7190da /platform | |
parent | 31077a813cad7d01c9f086bdd6cbfaae7250df85 (diff) | |
download | qtlocation-mapboxgl-9db5d2ac55de5cb96c41f0b0c1e88a9bc331449f.tar.gz |
Remove boost::make_unique
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/asset_request_baton_libzip.cpp | 7 | ||||
-rw-r--r-- | platform/default/http_request_baton_curl.cpp | 3 |
2 files changed, 4 insertions, 6 deletions
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 <mbgl/storage/asset_request_baton.hpp> #include <mbgl/storage/asset_request.hpp> #include <mbgl/storage/response.hpp> - -#include <boost/make_unique.hpp> +#include <mbgl/util/std.hpp> #include <cerrno> // 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<char[]> message = boost::make_unique<char[]>(message_size); + const std::unique_ptr<char[]> message = mbgl::util::make_unique<char[]>(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<char[]> data = boost::make_unique<char[]>(stat.size); + const std::unique_ptr<char[]> data = mbgl::util::make_unique<char[]>(stat.size); if (static_cast<zip_uint64_t>(zip_fread(apk_file, reinterpret_cast<void *>(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 <mbgl/android/jni.hpp> #include <zip.h> - #include <boost/make_unique.hpp> #include <openssl/ssl.h> #endif @@ -447,7 +446,7 @@ static CURLcode sslctx_function(CURL */*curl*/, void *sslctx, void */*parm*/) { return CURLE_SSL_CACERT_BADFILE; } - const std::unique_ptr<char[]> pem = boost::make_unique<char[]>(stat.size); + const std::unique_ptr<char[]> pem = util::make_unique<char[]>(stat.size); if (static_cast<zip_uint64_t>(zip_fread(apk_file, reinterpret_cast<void *>(pem.get()), stat.size)) != stat.size) { zip_fclose(apk_file); |