diff --git a/src/mbgl/renderer/sources/render_geojson_source.cpp b/src/mbgl/renderer/sources/render_geojson_source.cpp index 633df7088..96933e08a 100644 --- a/src/mbgl/renderer/sources/render_geojson_source.cpp +++ b/src/mbgl/renderer/sources/render_geojson_source.cpp @@ -59,9 +59,8 @@ FeatureExtensionValue getClusterExpansionZoom(std::shared_ptr(clusterData->getClusterExpansionZoom(clusterID))}; } -MAPBOX_ETERNAL_CONSTEXPR const auto extensionGetters = - mapbox::eternal::hash_map( - {{"children", &getChildren}, {"leaves", &getLeaves}, {"expansion-zoom", &getClusterExpansionZoom}}); +constexpr const auto extensionGetters = mapbox::eternal::hash_map( + {{"children", &getChildren}, {"leaves", &getLeaves}, {"expansion-zoom", &getClusterExpansionZoom}}); } // namespace diff --git a/src/mbgl/style/expression/compound_expression.cpp b/src/mbgl/style/expression/compound_expression.cpp index 6ab2ecf3d..cd8a8738a 100644 --- a/src/mbgl/style/expression/compound_expression.cpp +++ b/src/mbgl/style/expression/compound_expression.cpp @@ -988,7 +988,7 @@ const auto& filterInCompoundExpression() { } using ParseCompoundFunction = const std::unique_ptr& (*)(); -MAPBOX_ETERNAL_CONSTEXPR const auto compoundExpressionRegistry = +constexpr const auto compoundExpressionRegistry = mapbox::eternal::hash_map({ {"e", eCompoundExpression}, {"pi", piCompoundExpression}, diff --git a/src/mbgl/style/expression/parsing_context.cpp b/src/mbgl/style/expression/parsing_context.cpp index 67741a5ad..cbeb95474 100644 --- a/src/mbgl/style/expression/parsing_context.cpp +++ b/src/mbgl/style/expression/parsing_context.cpp @@ -103,43 +103,43 @@ ParseResult ParsingContext::parse(const Convertible& value, } using ParseFunction = ParseResult (*)(const conversion::Convertible&, ParsingContext&); -MAPBOX_ETERNAL_CONSTEXPR const auto expressionRegistry = - mapbox::eternal::hash_map({{"==", parseComparison}, - {"!=", parseComparison}, - {">", parseComparison}, - {"<", parseComparison}, - {">=", parseComparison}, - {"<=", parseComparison}, - {"all", All::parse}, - {"any", Any::parse}, - {"array", Assertion::parse}, - {"at", At::parse}, - {"in", In::parse}, - {"boolean", Assertion::parse}, - {"case", Case::parse}, - {"coalesce", Coalesce::parse}, - {"collator", CollatorExpression::parse}, - {"distance", Distance::parse}, - {"format", FormatExpression::parse}, - {"image", ImageExpression::parse}, - {"interpolate", parseInterpolate}, - {"length", Length::parse}, - {"let", Let::parse}, - {"literal", Literal::parse}, - {"match", parseMatch}, - {"number", Assertion::parse}, - {"number-format", NumberFormat::parse}, - {"object", Assertion::parse}, - {"step", Step::parse}, - {"string", Assertion::parse}, - {"to-boolean", Coercion::parse}, - {"to-color", Coercion::parse}, - {"to-number", Coercion::parse}, - {"to-string", Coercion::parse}, - {"var", Var::parse}, - {"within", Within::parse}, - {"index-of", IndexOf::parse}, - {"slice", Slice::parse}}); +constexpr const auto expressionRegistry = mapbox::eternal::hash_map( + {{"==", parseComparison}, + {"!=", parseComparison}, + {">", parseComparison}, + {"<", parseComparison}, + {">=", parseComparison}, + {"<=", parseComparison}, + {"all", All::parse}, + {"any", Any::parse}, + {"array", Assertion::parse}, + {"at", At::parse}, + {"in", In::parse}, + {"boolean", Assertion::parse}, + {"case", Case::parse}, + {"coalesce", Coalesce::parse}, + {"collator", CollatorExpression::parse}, + {"distance", Distance::parse}, + {"format", FormatExpression::parse}, + {"image", ImageExpression::parse}, + {"interpolate", parseInterpolate}, + {"length", Length::parse}, + {"let", Let::parse}, + {"literal", Literal::parse}, + {"match", parseMatch}, + {"number", Assertion::parse}, + {"number-format", NumberFormat::parse}, + {"object", Assertion::parse}, + {"step", Step::parse}, + {"string", Assertion::parse}, + {"to-boolean", Coercion::parse}, + {"to-color", Coercion::parse}, + {"to-number", Coercion::parse}, + {"to-string", Coercion::parse}, + {"var", Var::parse}, + {"within", Within::parse}, + {"index-of", IndexOf::parse}, + {"slice", Slice::parse}}); bool isExpression(const std::string& name) noexcept { return expressionRegistry.contains(name.c_str()); diff --git a/src/mbgl/style/layers/background_layer.cpp b/src/mbgl/style/layers/background_layer.cpp index 904f3cdf0..9a228c7a9 100644 --- a/src/mbgl/style/layers/background_layer.cpp +++ b/src/mbgl/style/layers/background_layer.cpp @@ -166,7 +166,7 @@ constexpr uint8_t toUint8(T t) noexcept { return uint8_t(mbgl::underlying_type(t)); } -MAPBOX_ETERNAL_CONSTEXPR const auto layerProperties = mapbox::eternal::hash_map( +constexpr const auto layerProperties = mapbox::eternal::hash_map( {{"background-color", toUint8(Property::BackgroundColor)}, {"background-opacity", toUint8(Property::BackgroundOpacity)}, {"background-pattern", toUint8(Property::BackgroundPattern)}, diff --git a/src/mbgl/style/layers/circle_layer.cpp b/src/mbgl/style/layers/circle_layer.cpp index a04ddf1df..6e1c748e6 100644 --- a/src/mbgl/style/layers/circle_layer.cpp +++ b/src/mbgl/style/layers/circle_layer.cpp @@ -415,7 +415,7 @@ constexpr uint8_t toUint8(T t) noexcept { return uint8_t(mbgl::underlying_type(t)); } -MAPBOX_ETERNAL_CONSTEXPR const auto layerProperties = mapbox::eternal::hash_map( +constexpr const auto layerProperties = mapbox::eternal::hash_map( {{"circle-blur", toUint8(Property::CircleBlur)}, {"circle-color", toUint8(Property::CircleColor)}, {"circle-opacity", toUint8(Property::CircleOpacity)}, diff --git a/src/mbgl/style/layers/fill_extrusion_layer.cpp b/src/mbgl/style/layers/fill_extrusion_layer.cpp index 0885349be..2df96887f 100644 --- a/src/mbgl/style/layers/fill_extrusion_layer.cpp +++ b/src/mbgl/style/layers/fill_extrusion_layer.cpp @@ -311,7 +311,7 @@ constexpr uint8_t toUint8(T t) noexcept { return uint8_t(mbgl::underlying_type(t)); } -MAPBOX_ETERNAL_CONSTEXPR const auto layerProperties = mapbox::eternal::hash_map( +constexpr const auto layerProperties = mapbox::eternal::hash_map( {{"fill-extrusion-base", toUint8(Property::FillExtrusionBase)}, {"fill-extrusion-color", toUint8(Property::FillExtrusionColor)}, {"fill-extrusion-height", toUint8(Property::FillExtrusionHeight)}, diff --git a/src/mbgl/style/layers/fill_layer.cpp b/src/mbgl/style/layers/fill_layer.cpp index dea9690fd..3076e179b 100644 --- a/src/mbgl/style/layers/fill_layer.cpp +++ b/src/mbgl/style/layers/fill_layer.cpp @@ -299,7 +299,7 @@ constexpr uint8_t toUint8(T t) noexcept { return uint8_t(mbgl::underlying_type(t)); } -MAPBOX_ETERNAL_CONSTEXPR const auto layerProperties = mapbox::eternal::hash_map( +constexpr const auto layerProperties = mapbox::eternal::hash_map( {{"fill-antialias", toUint8(Property::FillAntialias)}, {"fill-color", toUint8(Property::FillColor)}, {"fill-opacity", toUint8(Property::FillOpacity)}, diff --git a/src/mbgl/style/layers/heatmap_layer.cpp b/src/mbgl/style/layers/heatmap_layer.cpp index ed8ca711f..342db81aa 100644 --- a/src/mbgl/style/layers/heatmap_layer.cpp +++ b/src/mbgl/style/layers/heatmap_layer.cpp @@ -226,7 +226,7 @@ constexpr uint8_t toUint8(T t) noexcept { return uint8_t(mbgl::underlying_type(t)); } -MAPBOX_ETERNAL_CONSTEXPR const auto layerProperties = mapbox::eternal::hash_map( +constexpr const auto layerProperties = mapbox::eternal::hash_map( {{"heatmap-color", toUint8(Property::HeatmapColor)}, {"heatmap-intensity", toUint8(Property::HeatmapIntensity)}, {"heatmap-opacity", toUint8(Property::HeatmapOpacity)}, diff --git a/src/mbgl/style/layers/hillshade_layer.cpp b/src/mbgl/style/layers/hillshade_layer.cpp index 20df49a19..c4784bd42 100644 --- a/src/mbgl/style/layers/hillshade_layer.cpp +++ b/src/mbgl/style/layers/hillshade_layer.cpp @@ -253,7 +253,7 @@ constexpr uint8_t toUint8(T t) noexcept { return uint8_t(mbgl::underlying_type(t)); } -MAPBOX_ETERNAL_CONSTEXPR const auto layerProperties = mapbox::eternal::hash_map( +constexpr const auto layerProperties = mapbox::eternal::hash_map( {{"hillshade-accent-color", toUint8(Property::HillshadeAccentColor)}, {"hillshade-exaggeration", toUint8(Property::HillshadeExaggeration)}, {"hillshade-highlight-color", toUint8(Property::HillshadeHighlightColor)}, diff --git a/src/mbgl/style/layers/layer.cpp.ejs b/src/mbgl/style/layers/layer.cpp.ejs index 7bc881c1b..2e6647608 100644 --- a/src/mbgl/style/layers/layer.cpp.ejs +++ b/src/mbgl/style/layers/layer.cpp.ejs @@ -229,7 +229,7 @@ constexpr uint8_t toUint8(T t) noexcept { return uint8_t(mbgl::underlying_type(t)); } -MAPBOX_ETERNAL_CONSTEXPR const auto layerProperties = mapbox::eternal::hash_map( +constexpr const auto layerProperties = mapbox::eternal::hash_map( {<%- paintProperties.map(p => `{"${p.name}", toUint8(Property::${camelize(p.name)})}`).join(',\n ') %>, <% if (!layoutProperties.length) { -%> <%- paintProperties.map(p => `{"${p.name}-transition", toUint8(Property::${camelize(p.name)}Transition)}`).join(',\n ') %>}); diff --git a/src/mbgl/style/layers/line_layer.cpp b/src/mbgl/style/layers/line_layer.cpp index cb2e60fa0..6d9032079 100644 --- a/src/mbgl/style/layers/line_layer.cpp +++ b/src/mbgl/style/layers/line_layer.cpp @@ -480,7 +480,7 @@ constexpr uint8_t toUint8(T t) noexcept { return uint8_t(mbgl::underlying_type(t)); } -MAPBOX_ETERNAL_CONSTEXPR const auto layerProperties = mapbox::eternal::hash_map( +constexpr const auto layerProperties = mapbox::eternal::hash_map( {{"line-blur", toUint8(Property::LineBlur)}, {"line-color", toUint8(Property::LineColor)}, {"line-dasharray", toUint8(Property::LineDasharray)}, diff --git a/src/mbgl/style/layers/location_indicator_layer.cpp b/src/mbgl/style/layers/location_indicator_layer.cpp index 9c3f6163c..cd450c5eb 100644 --- a/src/mbgl/style/layers/location_indicator_layer.cpp +++ b/src/mbgl/style/layers/location_indicator_layer.cpp @@ -418,7 +418,7 @@ constexpr uint8_t toUint8(T t) noexcept { return uint8_t(mbgl::underlying_type(t)); } -MAPBOX_ETERNAL_CONSTEXPR const auto layerProperties = mapbox::eternal::hash_map( +constexpr const auto layerProperties = mapbox::eternal::hash_map( {{"accuracy-radius", toUint8(Property::AccuracyRadius)}, {"accuracy-radius-border-color", toUint8(Property::AccuracyRadiusBorderColor)}, {"accuracy-radius-color", toUint8(Property::AccuracyRadiusColor)}, diff --git a/src/mbgl/style/layers/raster_layer.cpp b/src/mbgl/style/layers/raster_layer.cpp index 94f068df3..a97ad7d2f 100644 --- a/src/mbgl/style/layers/raster_layer.cpp +++ b/src/mbgl/style/layers/raster_layer.cpp @@ -311,7 +311,7 @@ constexpr uint8_t toUint8(T t) noexcept { return uint8_t(mbgl::underlying_type(t)); } -MAPBOX_ETERNAL_CONSTEXPR const auto layerProperties = mapbox::eternal::hash_map( +constexpr const auto layerProperties = mapbox::eternal::hash_map( {{"raster-brightness-max", toUint8(Property::RasterBrightnessMax)}, {"raster-brightness-min", toUint8(Property::RasterBrightnessMin)}, {"raster-contrast", toUint8(Property::RasterContrast)}, diff --git a/src/mbgl/style/layers/symbol_layer.cpp b/src/mbgl/style/layers/symbol_layer.cpp index a059f9144..a2ef653e3 100644 --- a/src/mbgl/style/layers/symbol_layer.cpp +++ b/src/mbgl/style/layers/symbol_layer.cpp @@ -1142,7 +1142,7 @@ constexpr uint8_t toUint8(T t) noexcept { return uint8_t(mbgl::underlying_type(t)); } -MAPBOX_ETERNAL_CONSTEXPR const auto layerProperties = mapbox::eternal::hash_map( +constexpr const auto layerProperties = mapbox::eternal::hash_map( {{"icon-color", toUint8(Property::IconColor)}, {"icon-halo-blur", toUint8(Property::IconHaloBlur)}, {"icon-halo-color", toUint8(Property::IconHaloColor)}, diff --git a/src/mbgl/style/light.cpp b/src/mbgl/style/light.cpp index c045879a3..4d5189697 100644 --- a/src/mbgl/style/light.cpp +++ b/src/mbgl/style/light.cpp @@ -56,7 +56,7 @@ constexpr uint8_t toUint8(T t) noexcept { return uint8_t(mbgl::underlying_type(t)); } -MAPBOX_ETERNAL_CONSTEXPR const auto properties = mapbox::eternal::hash_map( +constexpr const auto properties = mapbox::eternal::hash_map( {{"anchor", toUint8(Property::Anchor)}, {"color", toUint8(Property::Color)}, {"intensity", toUint8(Property::Intensity)}, diff --git a/src/mbgl/style/light.cpp.ejs b/src/mbgl/style/light.cpp.ejs index 346fc3c43..ac3da22a2 100644 --- a/src/mbgl/style/light.cpp.ejs +++ b/src/mbgl/style/light.cpp.ejs @@ -54,7 +54,7 @@ constexpr uint8_t toUint8(T t) noexcept { return uint8_t(mbgl::underlying_type(t)); } -MAPBOX_ETERNAL_CONSTEXPR const auto properties = mapbox::eternal::hash_map( +constexpr const auto properties = mapbox::eternal::hash_map( {<%- properties.map(p => `{"${p.name}", toUint8(Property::${camelize(p.name)})}`).join(',\n ') %>, <%- properties.map(p => `{"${p.name}-transition", toUint8(Property::${camelize(p.name)}Transition)}`).join(',\n ') %>}); diff --git a/src/mbgl/util/i18n.cpp b/src/mbgl/util/i18n.cpp index 95e06462a..3ca7dcc71 100644 --- a/src/mbgl/util/i18n.cpp +++ b/src/mbgl/util/i18n.cpp @@ -321,7 +321,7 @@ DEFINE_IS_IN_UNICODE_BLOCK(HalfwidthandFullwidthForms, 0xFF00, 0xFFEF) // DEFINE_IS_IN_UNICODE_BLOCK(SupplementaryPrivateUseAreaA, 0xF0000, 0xFFFFF) // DEFINE_IS_IN_UNICODE_BLOCK(SupplementaryPrivateUseAreaB, 0x100000, 0x10FFFF) -MAPBOX_ETERNAL_CONSTEXPR const auto verticalPunctuation = mapbox::eternal::map({ +constexpr const auto verticalPunctuation = mapbox::eternal::map({ {u'!', u'︕'}, {u'#', u'#'}, {u'$', u'$'}, {u'%', u'%'}, {u'&', u'&'}, {u'(', u'︵'}, {u')', u'︶'}, {u'*', u'*'}, {u'+', u'+'}, {u',', u'︐'}, {u'-', u'︲'}, {u'.', u'・'}, {u'/', u'/'}, {u':', u'︓'}, {u';', u'︔'}, {u'<', u'︿'}, {u'=', u'='}, {u'>', u'﹀'}, {u'?', u'︖'}, {u'@', u'@'}, {u'[', u'﹇'},