convert image_reader public interface to use CamelCase to match the rest of codebase

This commit is contained in:
artemp
2014-11-26 17:50:12 +01:00
parent d978feed92
commit 84551d9349
7 changed files with 61 additions and 61 deletions

View File

@@ -42,21 +42,21 @@ inline boost::optional<std::string> type_from_bytes(char const* data, size_t siz
return result_type();
}
std::unique_ptr<image_reader> get_image_reader(char const* data, size_t size)
std::unique_ptr<ImageReader> getImageReader(char const* data, size_t size)
{
boost::optional<std::string> type = type_from_bytes(data,size);
if (type)
{
if (*type == "png")
{
return std::make_unique<png_reader<boost::iostreams::array_source>>(data, size);
return std::make_unique<PngReader<boost::iostreams::array_source>>(data, size);
}
else if (*type == "jpeg")
{
return std::make_unique<jpeg_reader<boost::iostreams::array_source>>(data, size);
return std::make_unique<JpegReader<boost::iostreams::array_source>>(data, size);
}
}
throw image_reader_exception("image_reader: can't determine type from input data");
throw ImageReaderException("ImageReader: can't determine type from input data");
}
}}