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

@@ -49,11 +49,11 @@ std::unique_ptr<ImageReader> getImageReader(char const* data, size_t size)
{
if (*type == "png")
{
return std::make_unique<PngReader<boost::iostreams::array_source>>(data, size);
return util::make_unique<PngReader<boost::iostreams::array_source>>(data, size);
}
else if (*type == "jpeg")
{
return std::make_unique<JpegReader<boost::iostreams::array_source>>(data, size);
return util::make_unique<JpegReader<boost::iostreams::array_source>>(data, size);
}
}
throw ImageReaderException("ImageReader: can't determine type from input data");