diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-23 13:37:00 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-23 17:28:44 -0800 |
commit | 36081f6486201d9bd316f3a8ceb5a38ad2e97310 (patch) | |
tree | 58797124ca97462a455c42314d0235ff6df33d11 /include/mbgl/util/image.hpp | |
parent | a620912176c066181c0cc81e41c9205cc2a0d9c0 (diff) | |
download | qtlocation-mapboxgl-36081f6486201d9bd316f3a8ceb5a38ad2e97310.tar.gz |
[core] For binary image data use uint8_t, not char
Diffstat (limited to 'include/mbgl/util/image.hpp')
-rw-r--r-- | include/mbgl/util/image.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/mbgl/util/image.hpp b/include/mbgl/util/image.hpp index f58c2c0989..fc4078501e 100644 --- a/include/mbgl/util/image.hpp +++ b/include/mbgl/util/image.hpp @@ -7,14 +7,14 @@ namespace mbgl { namespace util { -std::string compress_png(int width, int height, const void *rgba); +std::string compress_png(size_t width, size_t height, const uint8_t* rgba); class Image { public: - explicit Image(const std::string &img); + explicit Image(const std::string& img); - inline const char *getData() const { return img.get(); } + inline const uint8_t* getData() const { return img.get(); } inline uint32_t getWidth() const { return width; } inline uint32_t getHeight() const { return height; } inline operator bool() const { return img && width && height; } @@ -24,7 +24,7 @@ private: uint32_t width = 0, height = 0; // the raw image data - std::unique_ptr<char[]> img; + std::unique_ptr<uint8_t[]> img; }; |