return unique_ptr from get_image_reader

This commit is contained in:
artemp
2014-11-19 16:31:16 +01:00
parent f7e813238d
commit 04cea00d5d
3 changed files with 6 additions and 5 deletions

View File

@@ -76,7 +76,7 @@ Image::Image(std::string const& data)
{
try
{
std::unique_ptr<image_reader> reader(get_image_reader(data.c_str(), data.size()));
auto reader = get_image_reader(data.c_str(), data.size());
width = reader->width();
height = reader->height();
img = ::std::unique_ptr<char[]>(new char[width * height * 4]());