From 24425f9ba5fd2f8de388a242faa78020234fbcdf Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Tue, 20 Nov 2018 13:47:44 +0000 Subject: [PATCH] explicit cast to native enum type in switch statements to address `error: case value is not a constant expression` (clang version 8.0.0 (trunk 347189)) --- include/mapnik/markers_placement.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/mapnik/markers_placement.hpp b/include/mapnik/markers_placement.hpp index 0d4319115..62db90776 100644 --- a/include/mapnik/markers_placement.hpp +++ b/include/mapnik/markers_placement.hpp @@ -43,7 +43,7 @@ public: markers_placement_params const& params) : placement_type_(placement_type) { - switch (placement_type) + switch (marker_placement_enum(placement_type)) { default: case MARKER_POINT_PLACEMENT: @@ -66,7 +66,7 @@ public: ~markers_placement_finder() { - switch (placement_type_) + switch (marker_placement_enum(placement_type_)) { default: case MARKER_POINT_PLACEMENT: @@ -90,7 +90,7 @@ public: // Get next point where the marker should be placed. Returns true if a place is found, false if none is found. bool get_point(double &x, double &y, double &angle, bool ignore_placement) { - switch (placement_type_) + switch (marker_placement_enum(placement_type_)) { default: case MARKER_POINT_PLACEMENT: