add array overloads to make_unique and move it to mbgl::util from std

This commit is contained in:
Konstantin Käfer
2014-12-03 11:27:24 +01:00
parent 50669307c5
commit 82f3574d09
21 changed files with 84 additions and 58 deletions

View File

@@ -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)