summaryrefslogtreecommitdiff
path: root/platform/darwin/image.mm
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-12-03 11:27:24 +0100
committerKonstantin Käfer <mail@kkaefer.com>2014-12-03 11:27:24 +0100
commit82f3574d09064a442e30eb2dc7639f473749c5bd (patch)
treedfb0aa6182a0d7d04b6131199d67ff90a87cb9c1 /platform/darwin/image.mm
parent50669307c5648e62941a63e0c75dba8602448d9d (diff)
downloadqtlocation-mapboxgl-82f3574d09064a442e30eb2dc7639f473749c5bd.tar.gz
add array overloads to make_unique and move it to mbgl::util from std
Diffstat (limited to 'platform/darwin/image.mm')
-rw-r--r--platform/darwin/image.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/darwin/image.mm b/platform/darwin/image.mm
index b8df3c403e..4819d2cd3c 100644
--- a/platform/darwin/image.mm
+++ b/platform/darwin/image.mm
@@ -1,4 +1,5 @@
#include <mbgl/util/image.hpp>
+#include <mbgl/util/std.hpp>
#import <ImageIO/ImageIO.h>
@@ -97,7 +98,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 = ::std::unique_ptr<char[]>(new char[width * height * 4]());
+ img = util::make_unique<char[]>(width * height * 4);
CGContextRef context = CGBitmapContextCreate(img.get(), width, height, 8, width * 4,
color_space, kCGImageAlphaPremultipliedLast);
if (!context) {