Remove boost::make_unique
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
#include <list>
|
||||
#include <tuple>
|
||||
|
||||
#include <boost/make_unique.hpp>
|
||||
|
||||
#include <sys/system_properties.h>
|
||||
|
||||
#include <GLES2/gl2.h>
|
||||
@@ -15,6 +13,7 @@
|
||||
#include <mbgl/platform/platform.hpp>
|
||||
#include <mbgl/platform/event.hpp>
|
||||
#include <mbgl/platform/log.hpp>
|
||||
#include <mbgl/util/std.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
namespace android {
|
||||
@@ -194,7 +193,7 @@ bool NativeMapView::initializeDisplay() {
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::unique_ptr<EGLConfig[]> configs = boost::make_unique<EGLConfig[]>(num_configs); // switch to std::make_unique in C++14
|
||||
const std::unique_ptr<EGLConfig[]> configs = mbgl::util::make_unique<EGLConfig[]>(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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user