diff options
author | artemp <artem@mapnik.org> | 2014-11-26 17:50:12 +0100 |
---|---|---|
committer | artemp <artem@mapnik.org> | 2014-11-26 17:50:12 +0100 |
commit | 84551d93490071a970ef4aace7935097a8effc2e (patch) | |
tree | bac9085db6da64b54439d1b1a70fb98fe58d286c /include | |
parent | d978feed92b99f6f14fc925f865710fc98cf5d03 (diff) | |
download | qtlocation-mapboxgl-84551d93490071a970ef4aace7935097a8effc2e.tar.gz |
convert image_reader public interface to use CamelCase to match the rest of codebase
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/platform/default/image_reader.hpp | 16 | ||||
-rw-r--r-- | include/mbgl/platform/default/jpeg_reader.hpp | 10 | ||||
-rw-r--r-- | include/mbgl/platform/default/png_reader.hpp | 10 |
3 files changed, 18 insertions, 18 deletions
diff --git a/include/mbgl/platform/default/image_reader.hpp b/include/mbgl/platform/default/image_reader.hpp index a35830cf5e..985e4874cd 100644 --- a/include/mbgl/platform/default/image_reader.hpp +++ b/include/mbgl/platform/default/image_reader.hpp @@ -9,15 +9,15 @@ namespace mbgl { namespace util { -class image_reader_exception : public std::exception +class ImageReaderException : public std::exception { private: std::string message_; public: - image_reader_exception(std::string const& message) + ImageReaderException(std::string const& message) : message_(message) {} - ~image_reader_exception() throw() {} + ~ImageReaderException() throw() {} virtual const char* what() const throw() { @@ -25,17 +25,17 @@ public: } }; -struct image_reader : private noncopyable +struct ImageReader : private noncopyable { virtual unsigned width() const=0; virtual unsigned height() const=0; - virtual bool has_alpha() const=0; - virtual bool premultiplied_alpha() const=0; + virtual bool hasAlpha() const=0; + virtual bool premultipliedAlpha() const=0; virtual void read(unsigned x,unsigned y, unsigned width, unsigned height, char* image)=0; - virtual ~image_reader() {} + virtual ~ImageReader() {} }; -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); }} diff --git a/include/mbgl/platform/default/jpeg_reader.hpp b/include/mbgl/platform/default/jpeg_reader.hpp index 964e4731ee..7122f24cd2 100644 --- a/include/mbgl/platform/default/jpeg_reader.hpp +++ b/include/mbgl/platform/default/jpeg_reader.hpp @@ -14,7 +14,7 @@ extern "C" namespace mbgl { namespace util { template <typename T> -class jpeg_reader : public image_reader +class JpegReader : public ImageReader { public: using source_type = T; @@ -46,12 +46,12 @@ private: unsigned width_; unsigned height_; public: - jpeg_reader(char const* data, size_t size); - ~jpeg_reader(); + JpegReader(char const* data, size_t size); + ~JpegReader(); unsigned width() const; unsigned height() const; - inline bool has_alpha() const { return false; } - inline bool premultiplied_alpha() const { return true; } + inline bool hasAlpha() const { return false; } + inline bool premultipliedAlpha() const { return true; } void read(unsigned x,unsigned y, unsigned w, unsigned h, char *image); private: void init(); diff --git a/include/mbgl/platform/default/png_reader.hpp b/include/mbgl/platform/default/png_reader.hpp index db20d85e25..66debd4fba 100644 --- a/include/mbgl/platform/default/png_reader.hpp +++ b/include/mbgl/platform/default/png_reader.hpp @@ -16,7 +16,7 @@ extern "C" namespace mbgl { namespace util { template <typename T> -class png_reader : public image_reader +class PngReader : public ImageReader { using source_type = T; using input_stream = boost::iostreams::stream<source_type>; @@ -44,12 +44,12 @@ private: int color_type_; bool has_alpha_; public: - png_reader(char const* data, std::size_t size); - ~png_reader(); + PngReader(char const* data, std::size_t size); + ~PngReader(); unsigned width() const; unsigned height() const; - inline bool has_alpha() const { return has_alpha_; } - bool premultiplied_alpha() const { return true; } // png_set_alpha_mode(png, PNG_ALPHA_PREMULTIPLIED, 2.2) + inline bool hasAlpha() const { return has_alpha_; } + bool premultipliedAlpha() const { return true; } // png_set_alpha_mode(png, PNG_ALPHA_PREMULTIPLIED, 2.2) void read(unsigned x,unsigned y, unsigned width, unsigned height, char * image); private: void init(); |