diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/util/image.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mbgl/util/image.hpp b/include/mbgl/util/image.hpp index 0bc5af21d2..cb7db6d6fc 100644 --- a/include/mbgl/util/image.hpp +++ b/include/mbgl/util/image.hpp @@ -17,6 +17,7 @@ public: inline const char *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; } private: // loaded image dimensions @@ -24,7 +25,6 @@ private: // the raw image data std::unique_ptr<char[]> img; - }; |