From e90a4fca7d93945af52949d401e281b0abdbfff4 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Wed, 12 Jun 2019 09:40:10 +0100 Subject: [PATCH] add missing image `scaling` property meta type + replace to integer conversion with comparison operator in enumeration_wrapper + change order in value_base_type (ref #4045) --- include/mapnik/symbolizer.hpp | 1 + include/mapnik/symbolizer_base.hpp | 7 ++++--- src/symbolizer_keys.cpp | 7 ++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/mapnik/symbolizer.hpp b/include/mapnik/symbolizer.hpp index 31e756b6d..68e516146 100644 --- a/include/mapnik/symbolizer.hpp +++ b/include/mapnik/symbolizer.hpp @@ -97,6 +97,7 @@ enum class property_types : std::uint8_t target_font_feature_settings, target_line_pattern, target_smooth_algorithm, + target_scaling_method }; template diff --git a/include/mapnik/symbolizer_base.hpp b/include/mapnik/symbolizer_base.hpp index f2f863938..79f256eb9 100644 --- a/include/mapnik/symbolizer_base.hpp +++ b/include/mapnik/symbolizer_base.hpp @@ -68,10 +68,11 @@ struct enumeration_wrapper explicit enumeration_wrapper(T value_) : value(value_) {} - inline operator int() const + inline bool operator==(enumeration_wrapper const& rhs) const { - return value; + return value == rhs.value; } + }; using dash_array = std::vector >; @@ -82,8 +83,8 @@ using text_placements_ptr = std::shared_ptr; namespace detail { using value_base_type = util::variant