From e353225772e23de6c8b9d90f64bde0772f817b49 Mon Sep 17 00:00:00 2001 From: Blake Thompson Date: Thu, 22 Jan 2015 10:58:01 -0600 Subject: [PATCH] Modified the name of image_data_null to image_null. --- include/mapnik/image_any.hpp | 6 +++--- include/mapnik/image_data.hpp | 2 +- .../mapnik/renderer_common/process_raster_symbolizer.hpp | 4 ++-- include/mapnik/tiff_io.hpp | 2 +- src/image_util.cpp | 6 +++--- src/image_util_jpeg.cpp | 2 +- src/image_util_png.cpp | 4 ++-- src/image_util_tiff.cpp | 2 +- src/image_util_webp.cpp | 2 +- src/marker_cache.cpp | 2 +- src/renderer_common/process_group_symbolizer.cpp | 2 +- src/renderer_common/render_pattern.cpp | 4 ++-- src/warp.cpp | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) diff --git a/include/mapnik/image_any.hpp b/include/mapnik/image_any.hpp index 054c57fc0..92f17d98e 100644 --- a/include/mapnik/image_any.hpp +++ b/include/mapnik/image_any.hpp @@ -28,7 +28,7 @@ namespace mapnik { -struct image_data_null +struct image_null { using pixel_type = uint8_t; unsigned char const* getBytes() const { return nullptr; } @@ -51,7 +51,7 @@ struct image_data_null } }; -using image_data_base = util::variant ; using image_gray16 = image_data; using image_gray32f = image_data; -enum image_dtype +enum image_dtype : std::uint8_t { image_dtype_rgba8 = 0, image_dtype_gray8, diff --git a/include/mapnik/renderer_common/process_raster_symbolizer.hpp b/include/mapnik/renderer_common/process_raster_symbolizer.hpp index 881393531..53b6b7362 100644 --- a/include/mapnik/renderer_common/process_raster_symbolizer.hpp +++ b/include/mapnik/renderer_common/process_raster_symbolizer.hpp @@ -69,7 +69,7 @@ struct image_data_dispatcher composite_(composite), nodata_(nodata) {} - void operator() (image_data_null const& data_in) const {} //no-op + void operator() (image_null const& data_in) const {} //no-op void operator() (image_rgba8 const& data_in) const { image_rgba8 data_out(width_, height_, true, true); @@ -135,7 +135,7 @@ struct image_data_warp_dispatcher composite_(composite), nodata_(nodata) {} - void operator() (image_data_null const& data_in) const {} //no-op + void operator() (image_null const& data_in) const {} //no-op void operator() (image_rgba8 const& data_in) const { diff --git a/include/mapnik/tiff_io.hpp b/include/mapnik/tiff_io.hpp index 0a27ebf75..5b94cc813 100644 --- a/include/mapnik/tiff_io.hpp +++ b/include/mapnik/tiff_io.hpp @@ -257,7 +257,7 @@ struct tag_setter } } - inline void operator() (image_data_null const&) const + inline void operator() (image_null const&) const { // Assume this would be null type throw ImageWriterException("Could not write TIFF - Null image provided"); diff --git a/src/image_util.cpp b/src/image_util.cpp index db064a554..56091771c 100644 --- a/src/image_util.cpp +++ b/src/image_util.cpp @@ -431,7 +431,7 @@ template bool is_solid_visitor::operator() (image_view_gray16 template bool is_solid_visitor::operator() (image_view_gray32f const& data); template<> -bool is_solid_visitor::operator() (image_data_null const&) +bool is_solid_visitor::operator() (image_null const&) { return true; } @@ -921,7 +921,7 @@ void visitor_set_rectangle::operator() (image_rgba8 & dst) } template<> -void visitor_set_rectangle::operator() (image_data_null &) +void visitor_set_rectangle::operator() (image_null &) { throw std::runtime_error("Set rectangle not support for null images"); } @@ -1250,7 +1250,7 @@ struct visitor_create_view }; template <> -image_view_any visitor_create_view::operator() (image_data_null const&) +image_view_any visitor_create_view::operator() (image_null const&) { throw std::runtime_error("Can not make a view from a null image"); } diff --git a/src/image_util_jpeg.cpp b/src/image_util_jpeg.cpp index 523f73b06..693fe96c6 100644 --- a/src/image_util_jpeg.cpp +++ b/src/image_util_jpeg.cpp @@ -77,7 +77,7 @@ void jpeg_saver::operator() (image_view_rgba8 const& image) co } template<> -void jpeg_saver::operator() (image_data_null const& image) const +void jpeg_saver::operator() (image_null const& image) const { throw ImageWriterException("Can not save a null image to jpeg"); } diff --git a/src/image_util_png.cpp b/src/image_util_png.cpp index 41c293a1d..ed38c828d 100644 --- a/src/image_util_png.cpp +++ b/src/image_util_png.cpp @@ -184,13 +184,13 @@ png_saver_pal::png_saver_pal(std::ostream & stream, std::string const& t, rgba_p stream_(stream), t_(t), pal_(pal) {} template<> -void png_saver::operator() (image_data_null const& image) const +void png_saver::operator() (image_null const& image) const { throw ImageWriterException("null images not supported for png"); } template<> -void png_saver_pal::operator() (image_data_null const& image) const +void png_saver_pal::operator() (image_null const& image) const { throw ImageWriterException("null images not supported for png"); } diff --git a/src/image_util_tiff.cpp b/src/image_util_tiff.cpp index 75935f599..29ec07565 100644 --- a/src/image_util_tiff.cpp +++ b/src/image_util_tiff.cpp @@ -164,7 +164,7 @@ void handle_tiff_options(std::string const& type, tiff_saver::tiff_saver(std::ostream & stream, std::string const& t): stream_(stream), t_(t) {} template<> -void tiff_saver::operator() (image_data_null const& image) const +void tiff_saver::operator() (image_null const& image) const { throw ImageWriterException("null images not supported"); } diff --git a/src/image_util_webp.cpp b/src/image_util_webp.cpp index a46a4954c..34ec6ea72 100644 --- a/src/image_util_webp.cpp +++ b/src/image_util_webp.cpp @@ -335,7 +335,7 @@ webp_saver::webp_saver(std::ostream & stream, std::string const& t): stream_(stream), t_(t) {} template<> -void webp_saver::operator() (image_data_null const& image) const +void webp_saver::operator() (image_null const& image) const { throw ImageWriterException("null images not supported"); } diff --git a/src/marker_cache.cpp b/src/marker_cache.cpp index 63b27f1d7..897fab04a 100644 --- a/src/marker_cache.cpp +++ b/src/marker_cache.cpp @@ -143,7 +143,7 @@ marker_ptr visitor_create_marker::operator() (image_rgba8 & data) } template<> -marker_ptr visitor_create_marker::operator() (image_data_null & data) +marker_ptr visitor_create_marker::operator() (image_null & data) { throw std::runtime_error("Can not make marker from null image data type"); } diff --git a/src/renderer_common/process_group_symbolizer.cpp b/src/renderer_common/process_group_symbolizer.cpp index 2c19d63f7..ac00db020 100644 --- a/src/renderer_common/process_group_symbolizer.cpp +++ b/src/renderer_common/process_group_symbolizer.cpp @@ -154,7 +154,7 @@ struct visitor_push_thunk }; template <> -void visitor_push_thunk::operator() (image_data_null &) +void visitor_push_thunk::operator() (image_null &) { throw std::runtime_error("Push thunk does not support null images"); } diff --git a/src/renderer_common/render_pattern.cpp b/src/renderer_common/render_pattern.cpp index 6ad5e7ca4..8fc1ac5c2 100644 --- a/src/renderer_common/render_pattern.cpp +++ b/src/renderer_common/render_pattern.cpp @@ -72,12 +72,12 @@ std::shared_ptr render_pattern(rasterizer & ras, } template <> -std::shared_ptr render_pattern(rasterizer & ras, +std::shared_ptr render_pattern(rasterizer & ras, marker const& marker, agg::trans_affine const& tr, double opacity) { - throw std::runtime_error("Can not return image_data_null type from render pattern"); + throw std::runtime_error("Can not return image_null type from render pattern"); } /* template <> diff --git a/src/warp.cpp b/src/warp.cpp index a6a350685..89390e6a2 100644 --- a/src/warp.cpp +++ b/src/warp.cpp @@ -172,7 +172,7 @@ struct warp_image_visitor scaling_method_(scaling_method), filter_factor_(filter_factor) {} - void operator() (image_data_null const&) {} + void operator() (image_null const&) {} template void operator() (T const& source)