diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-05-26 15:18:27 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-05-26 17:57:38 +0200 |
commit | f4707f72e0ce7f1c40337c72ae5c0c0c8ef0efed (patch) | |
tree | 31102ca2b739d2b21fcfc231585830969f2b4fa4 /platform/darwin | |
parent | fdf6026e6249f99b260f15ec672a35c7e9db950d (diff) | |
download | qtlocation-mapboxgl-f4707f72e0ce7f1c40337c72ae5c0c0c8ef0efed.tar.gz |
Replace mbgl::util::make_unique<> with std::make_unique<>
Diffstat (limited to 'platform/darwin')
-rw-r--r-- | platform/darwin/http_request_nsurl.mm | 9 | ||||
-rw-r--r-- | platform/darwin/image.mm | 3 |
2 files changed, 5 insertions, 7 deletions
diff --git a/platform/darwin/http_request_nsurl.mm b/platform/darwin/http_request_nsurl.mm index ad16a69acf..207c33b23c 100644 --- a/platform/darwin/http_request_nsurl.mm +++ b/platform/darwin/http_request_nsurl.mm @@ -2,7 +2,6 @@ #include <mbgl/storage/resource.hpp> #include <mbgl/storage/response.hpp> -#include <mbgl/util/std.hpp> #include <mbgl/util/time.hpp> #include <mbgl/util/parsedate.h> @@ -250,7 +249,7 @@ void HTTPRequest::handleResult(NSData *data, NSURLResponse *res, NSError *error) } else { // TODO: Use different codes for host not found, timeout, invalid URL etc. // These can be categorized in temporary and permanent errors. - response = util::make_unique<Response>(); + response = std::make_unique<Response>(); response->status = Response::Error; response->message = [[error localizedDescription] UTF8String]; @@ -282,7 +281,7 @@ void HTTPRequest::handleResult(NSData *data, NSURLResponse *res, NSError *error) } else if ([res isKindOfClass:[NSHTTPURLResponse class]]) { const long responseCode = [(NSHTTPURLResponse *)res statusCode]; - response = util::make_unique<Response>(); + response = std::make_unique<Response>(); response->data = {(const char *)[data bytes], [data length]}; NSDictionary *headers = [(NSHTTPURLResponse *)res allHeaderFields]; @@ -338,7 +337,7 @@ void HTTPRequest::handleResult(NSData *data, NSURLResponse *res, NSError *error) } else { // This should never happen. status = ResponseStatus::PermanentError; - response = util::make_unique<Response>(); + response = std::make_unique<Response>(); response->status = Response::Error; response->message = "response class is not NSHTTPURLResponse"; } @@ -364,7 +363,7 @@ void HTTPRequest::retry() { } std::unique_ptr<HTTPContext> HTTPContext::createContext(uv_loop_t* loop) { - return util::make_unique<HTTPNSURLContext>(loop); + return std::make_unique<HTTPNSURLContext>(loop); } } diff --git a/platform/darwin/image.mm b/platform/darwin/image.mm index a9044774dc..f6a8a6783c 100644 --- a/platform/darwin/image.mm +++ b/platform/darwin/image.mm @@ -1,5 +1,4 @@ #include <mbgl/util/image.hpp> -#include <mbgl/util/std.hpp> #import <ImageIO/ImageIO.h> @@ -98,7 +97,7 @@ Image::Image(const std::string &source_data) { height = uint32_t(CGImageGetHeight(image)); CGRect rect = {{ 0, 0 }, { static_cast<CGFloat>(width), static_cast<CGFloat>(height) }}; - img = util::make_unique<char[]>(width * height * 4); + img = std::make_unique<char[]>(width * height * 4); CGContextRef context = CGBitmapContextCreate(img.get(), width, height, 8, width * 4, color_space, kCGImageAlphaPremultipliedLast); if (!context) { |