diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-12-03 11:27:24 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-12-03 11:27:24 +0100 |
commit | 82f3574d09064a442e30eb2dc7639f473749c5bd (patch) | |
tree | dfb0aa6182a0d7d04b6131199d67ff90a87cb9c1 /platform/default/image.cpp | |
parent | 50669307c5648e62941a63e0c75dba8602448d9d (diff) | |
download | qtlocation-mapboxgl-82f3574d09064a442e30eb2dc7639f473749c5bd.tar.gz |
add array overloads to make_unique and move it to mbgl::util from std
Diffstat (limited to 'platform/default/image.cpp')
-rw-r--r-- | platform/default/image.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/default/image.cpp b/platform/default/image.cpp index 242367e889..d881b9231c 100644 --- a/platform/default/image.cpp +++ b/platform/default/image.cpp @@ -1,5 +1,6 @@ #include <mbgl/util/image.hpp> #include <mbgl/util/string.hpp> +#include <mbgl/util/std.hpp> #include <png.h> @@ -80,7 +81,7 @@ Image::Image(std::string const& data) auto reader = getImageReader(data.c_str(), data.size()); width = reader->width(); height = reader->height(); - img = ::std::unique_ptr<char[]>(new char[width * height * 4]()); + img = util::make_unique<char[]>(width * height * 4); reader->read(0, 0, width, height, img.get()); } catch (ImageReaderException const& ex) |