diff --git a/include/mapnik/image_data_any.hpp b/include/mapnik/image_data_any.hpp index dec500225..0c6fe0623 100644 --- a/include/mapnik/image_data_any.hpp +++ b/include/mapnik/image_data_any.hpp @@ -28,7 +28,15 @@ namespace mapnik { -using image_data_base = util::variant; +struct image_data_null +{ + unsigned char const* getBytes() const { return nullptr; } + unsigned char* getBytes() { return nullptr;} + std::size_t width() const { return 0; } + std::size_t height() const { return 0; } +}; + +using image_data_base = util::variant; namespace detail { @@ -72,6 +80,8 @@ struct get_height_visitor : util::static_visitor struct image_data_any : image_data_base { + image_data_any() = default; + template image_data_any(T && data) noexcept : image_data_base(std::move(data)) {}