summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-09-23 17:22:38 +0300
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-09-25 21:26:07 +0300
commit58676b5a3238963b45fb6cfeb6e2b691fb9df0eb (patch)
tree4146264cf1aa24b50d0d75791fdeb0656839640f
parent3f6f4c43ab55bb75699eaac3211256f06930275d (diff)
downloadqtlocation-mapboxgl-upstream/alexshalamov_remove_unaccent.tar.gz
[core][android][darwin] Move number format to i18nupstream/alexshalamov_remove_unaccent
-rw-r--r--include/mbgl/i18n/number_format.hpp15
-rw-r--r--include/mbgl/util/platform.hpp3
-rw-r--r--next/platform/android/android.cmake8
-rw-r--r--next/platform/ios/ios.cmake1
-rw-r--r--next/platform/linux/linux.cmake4
-rw-r--r--next/platform/macos/macos.cmake1
-rw-r--r--next/platform/qt/qt.cmake2
-rw-r--r--platform/android/core-files.json7
-rw-r--r--platform/android/src/i18n/number_format.cpp (renamed from platform/android/src/text/format_number.cpp)5
-rw-r--r--platform/android/src/i18n/number_format_jni.hpp (renamed from platform/android/src/text/format_number_jni.hpp)2
-rw-r--r--platform/android/src/jni_native.cpp2
-rw-r--r--platform/darwin/src/number_format.mm36
-rw-r--r--platform/darwin/src/string_nsstring.mm31
-rw-r--r--platform/default/src/mbgl/i18n/format_number.cpp (renamed from platform/default/src/mbgl/util/format_number.cpp)2
-rw-r--r--platform/default/src/mbgl/i18n/number_format.cpp41
-rw-r--r--platform/ios/core-files.json1
-rw-r--r--platform/linux/config.cmake12
-rw-r--r--platform/macos/core-files.json1
-rw-r--r--platform/qt/src/number_format.cpp (renamed from platform/qt/src/format_number.cpp)0
-rw-r--r--src/core-files.json2
-rw-r--r--src/mbgl/style/expression/number_format.cpp4
21 files changed, 124 insertions, 56 deletions
diff --git a/include/mbgl/i18n/number_format.hpp b/include/mbgl/i18n/number_format.hpp
new file mode 100644
index 0000000000..cb1e94c7bd
--- /dev/null
+++ b/include/mbgl/i18n/number_format.hpp
@@ -0,0 +1,15 @@
+#pragma once
+
+#include <string>
+
+namespace mbgl {
+namespace platform {
+
+std::string formatNumber(double number,
+ const std::string& localeId,
+ const std::string& currency,
+ uint8_t minFractionDigits,
+ uint8_t maxFractionDigits);
+
+} // namespace platform
+} // namespace mbgl
diff --git a/include/mbgl/util/platform.hpp b/include/mbgl/util/platform.hpp
index 2e11e5f186..3544659740 100644
--- a/include/mbgl/util/platform.hpp
+++ b/include/mbgl/util/platform.hpp
@@ -16,9 +16,6 @@ std::string lowercase(const std::string &string);
// Gets the name of the current thread.
std::string getCurrentThreadName();
-std::string formatNumber(double number, const std::string& localeId, const std::string& currency,
- uint8_t minFractionDigits, uint8_t maxFractionDigits);
-
// Set the name of the current thread, truncated at 15.
void setCurrentThreadName(const std::string& name);
diff --git a/next/platform/android/android.cmake b/next/platform/android/android.cmake
index edc74576dc..507c1baef0 100644
--- a/next/platform/android/android.cmake
+++ b/next/platform/android/android.cmake
@@ -85,6 +85,10 @@ target_sources(
${MBGL_ROOT}/platform/android/src/gson/json_primitive.cpp
${MBGL_ROOT}/platform/android/src/gson/json_primitive.hpp
${MBGL_ROOT}/platform/android/src/http_file_source.cpp
+ ${MBGL_ROOT}/platform/android/src/i18n/collator.cpp
+ ${MBGL_ROOT}/platform/android/src/i18n/collator_jni.hpp
+ ${MBGL_ROOT}/platform/android/src/i18n/number_format.cpp
+ ${MBGL_ROOT}/platform/android/src/i18n/number_format_jni.hpp
${MBGL_ROOT}/platform/android/src/image.cpp
${MBGL_ROOT}/platform/android/src/java/util.cpp
${MBGL_ROOT}/platform/android/src/java/util.hpp
@@ -187,10 +191,6 @@ target_sources(
${MBGL_ROOT}/platform/android/src/style/transition_options.hpp
${MBGL_ROOT}/platform/android/src/style/value.cpp
${MBGL_ROOT}/platform/android/src/style/value.hpp
- ${MBGL_ROOT}/platform/android/src/i18n/collator.cpp
- ${MBGL_ROOT}/platform/android/src/i18n/collator_jni.hpp
- ${MBGL_ROOT}/platform/android/src/text/format_number.cpp
- ${MBGL_ROOT}/platform/android/src/text/format_number_jni.hpp
${MBGL_ROOT}/platform/android/src/text/local_glyph_rasterizer.cpp
${MBGL_ROOT}/platform/android/src/text/local_glyph_rasterizer_jni.hpp
${MBGL_ROOT}/platform/android/src/thread.cpp
diff --git a/next/platform/ios/ios.cmake b/next/platform/ios/ios.cmake
index 507150fc9a..7a729d996a 100644
--- a/next/platform/ios/ios.cmake
+++ b/next/platform/ios/ios.cmake
@@ -15,6 +15,7 @@ target_sources(
${MBGL_ROOT}/platform/darwin/src/local_glyph_rasterizer.mm
${MBGL_ROOT}/platform/darwin/src/logging_nslog.mm
${MBGL_ROOT}/platform/darwin/src/nsthread.mm
+ ${MBGL_ROOT}/platform/darwin/src/number_format.mm
${MBGL_ROOT}/platform/darwin/src/reachability.m
${MBGL_ROOT}/platform/darwin/src/run_loop.cpp
${MBGL_ROOT}/platform/darwin/src/string_nsstring.mm
diff --git a/next/platform/linux/linux.cmake b/next/platform/linux/linux.cmake
index 993d3512e3..18531a2856 100644
--- a/next/platform/linux/linux.cmake
+++ b/next/platform/linux/linux.cmake
@@ -15,6 +15,8 @@ target_sources(
${MBGL_ROOT}/platform/default/src/mbgl/gfx/headless_backend.cpp
${MBGL_ROOT}/platform/default/src/mbgl/gfx/headless_frontend.cpp
${MBGL_ROOT}/platform/default/src/mbgl/gl/headless_backend.cpp
+ ${MBGL_ROOT}/platform/default/src/mbgl/i18n/collator.cpp
+ ${MBGL_ROOT}/platform/default/src/mbgl/i18n/number_format.cpp
${MBGL_ROOT}/platform/default/src/mbgl/layermanager/layer_manager.cpp
${MBGL_ROOT}/platform/default/src/mbgl/storage/asset_file_source.cpp
${MBGL_ROOT}/platform/default/src/mbgl/storage/default_file_source.cpp
@@ -29,11 +31,9 @@ target_sources(
${MBGL_ROOT}/platform/default/src/mbgl/storage/online_file_source.cpp
${MBGL_ROOT}/platform/default/src/mbgl/storage/sqlite3.cpp
${MBGL_ROOT}/platform/default/src/mbgl/text/bidi.cpp
- ${MBGL_ROOT}/platform/default/src/mbgl/i18n/collator.cpp
${MBGL_ROOT}/platform/default/src/mbgl/text/local_glyph_rasterizer.cpp
${MBGL_ROOT}/platform/default/src/mbgl/util/async_task.cpp
${MBGL_ROOT}/platform/default/src/mbgl/util/compression.cpp
- ${MBGL_ROOT}/platform/default/src/mbgl/util/format_number.cpp
${MBGL_ROOT}/platform/default/src/mbgl/util/image.cpp
${MBGL_ROOT}/platform/default/src/mbgl/util/jpeg_reader.cpp
${MBGL_ROOT}/platform/default/src/mbgl/util/logging_stderr.cpp
diff --git a/next/platform/macos/macos.cmake b/next/platform/macos/macos.cmake
index d0aad9c3dc..a0dcb9a829 100644
--- a/next/platform/macos/macos.cmake
+++ b/next/platform/macos/macos.cmake
@@ -83,6 +83,7 @@ target_sources(
${MBGL_ROOT}/platform/darwin/src/local_glyph_rasterizer.mm
${MBGL_ROOT}/platform/darwin/src/logging_nslog.mm
${MBGL_ROOT}/platform/darwin/src/nsthread.mm
+ ${MBGL_ROOT}/platform/darwin/src/number_format.mm
${MBGL_ROOT}/platform/darwin/src/reachability.m
${MBGL_ROOT}/platform/darwin/src/run_loop.cpp
${MBGL_ROOT}/platform/darwin/src/string_nsstring.mm
diff --git a/next/platform/qt/qt.cmake b/next/platform/qt/qt.cmake
index 59aa00788f..b902388565 100644
--- a/next/platform/qt/qt.cmake
+++ b/next/platform/qt/qt.cmake
@@ -45,7 +45,7 @@ target_sources(
${MBGL_ROOT}/platform/default/src/mbgl/util/compression.cpp
${MBGL_ROOT}/platform/qt/src/async_task.cpp
${MBGL_ROOT}/platform/qt/src/async_task_impl.hpp
- ${MBGL_ROOT}/platform/qt/src/format_number.cpp
+ ${MBGL_ROOT}/platform/qt/src/number_format.cpp
${MBGL_ROOT}/platform/qt/src/gl_functions.cpp
${MBGL_ROOT}/platform/qt/src/headless_backend_qt.cpp
${MBGL_ROOT}/platform/qt/src/http_file_source.cpp
diff --git a/platform/android/core-files.json b/platform/android/core-files.json
index 4057b21000..e442883e47 100644
--- a/platform/android/core-files.json
+++ b/platform/android/core-files.json
@@ -34,6 +34,8 @@
"platform/android/src/gson/json_element.cpp",
"platform/android/src/gson/json_object.cpp",
"platform/android/src/gson/json_primitive.cpp",
+ "platform/android/src/i18n/collator.cpp",
+ "platform/android/src/i18n/number_format.cpp",
"platform/android/src/image.cpp",
"platform/android/src/java/util.cpp",
"platform/android/src/java_types.cpp",
@@ -80,9 +82,7 @@
"platform/android/src/style/sources/vector_source.cpp",
"platform/android/src/style/transition_options.cpp",
"platform/android/src/style/value.cpp",
- "platform/android/src/i18n/collator.cpp",
"platform/android/src/text/local_glyph_rasterizer.cpp",
- "platform/android/src/text/format_number.cpp",
"platform/android/src/gl_functions.cpp",
"platform/android/src/thread.cpp",
"platform/android/src/timer.cpp",
@@ -143,6 +143,8 @@
"java_types.hpp": "platform/android/src/java_types.hpp",
"jni.hpp": "platform/android/src/jni.hpp",
"jni_native.hpp": "platform/android/src/jni_native.hpp",
+ "i18n/collator_jni.hpp": "platform/android/src/i18n/collator_jni.hpp",
+ "i18n/number_format_jni.hpp": "platform/android/src/i18n/number_format_jni.hpp",
"logger.hpp": "platform/android/src/logger.hpp",
"map/camera_position.hpp": "platform/android/src/map/camera_position.hpp",
"map/image.hpp": "platform/android/src/map/image.hpp",
@@ -185,7 +187,6 @@
"style/sources/vector_source.hpp": "platform/android/src/style/sources/vector_source.hpp",
"style/transition_options.hpp": "platform/android/src/style/transition_options.hpp",
"style/value.hpp": "platform/android/src/style/value.hpp",
- "text/collator_jni.hpp": "platform/android/src/i18n/collator_jni.hpp",
"text/local_glyph_rasterizer_jni.hpp": "platform/android/src/text/local_glyph_rasterizer_jni.hpp"
}
}
diff --git a/platform/android/src/text/format_number.cpp b/platform/android/src/i18n/number_format.cpp
index 3a41175ecc..c8e0b70562 100644
--- a/platform/android/src/text/format_number.cpp
+++ b/platform/android/src/i18n/number_format.cpp
@@ -1,11 +1,10 @@
-#include <mbgl/style/expression/collator.hpp>
+#include <mbgl/i18n/number_format.hpp>
#include <mbgl/text/language_tag.hpp>
-#include <mbgl/util/platform.hpp>
#include <jni/jni.hpp>
#include "../attach_env.hpp"
-#include "format_number_jni.hpp"
+#include "number_format_jni.hpp"
namespace mbgl {
namespace android {
diff --git a/platform/android/src/text/format_number_jni.hpp b/platform/android/src/i18n/number_format_jni.hpp
index 1b63012c6e..1720038925 100644
--- a/platform/android/src/text/format_number_jni.hpp
+++ b/platform/android/src/i18n/number_format_jni.hpp
@@ -2,7 +2,7 @@
#include <jni/jni.hpp>
-#include "../i18n/collator_jni.hpp"
+#include "collator_jni.hpp"
/*
android::NumberFormat is the JNI wrapper
diff --git a/platform/android/src/jni_native.cpp b/platform/android/src/jni_native.cpp
index 966dc6a007..9fe14f8f1f 100644
--- a/platform/android/src/jni_native.cpp
+++ b/platform/android/src/jni_native.cpp
@@ -51,9 +51,9 @@
#include "snapshotter/map_snapshot.hpp"
#endif
#include "i18n/collator_jni.hpp"
+#include "i18n/number_format_jni.hpp"
#include "logger.hpp"
#include "text/local_glyph_rasterizer_jni.hpp"
-#include "text/format_number_jni.hpp"
namespace mbgl {
namespace android {
diff --git a/platform/darwin/src/number_format.mm b/platform/darwin/src/number_format.mm
new file mode 100644
index 0000000000..86f16eb6dd
--- /dev/null
+++ b/platform/darwin/src/number_format.mm
@@ -0,0 +1,36 @@
+#import <Foundation/Foundation.h>
+
+#include <mbgl/i18n/number_format.hpp>
+
+namespace mbgl {
+namespace platform {
+
+std::string formatNumber(double number, const std::string& localeId, const std::string& currency,
+ uint8_t minFractionDigits, uint8_t maxFractionDigits) {
+
+ static NSNumberFormatter *numberFormatter;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ numberFormatter = [[NSNumberFormatter alloc] init];
+ });
+
+ numberFormatter.locale = !localeId.empty() ? [NSLocale localeWithLocaleIdentifier:@(localeId.c_str())] : nil;
+ numberFormatter.currencyCode = !currency.empty() ? @(currency.c_str()) : nil;
+ if (currency.empty()) {
+ numberFormatter.minimumFractionDigits = minFractionDigits;
+ numberFormatter.maximumFractionDigits = maxFractionDigits;
+ numberFormatter.numberStyle = NSNumberFormatterDecimalStyle;
+ } else {
+ // Reset fraction digits to NSNumberFormatter's default values, so that the
+ // system will choose formatting based on number formatter locale.
+ numberFormatter.minimumFractionDigits = 0;
+ numberFormatter.maximumFractionDigits = 0;
+ numberFormatter.numberStyle = NSNumberFormatterCurrencyStyle;
+ }
+ NSString *formatted = [numberFormatter stringFromNumber:@(number)];
+ std::string result = std::string([formatted UTF8String]);
+ return result;
+}
+
+} // namespace platform
+} // namespace mbgl
diff --git a/platform/darwin/src/string_nsstring.mm b/platform/darwin/src/string_nsstring.mm
index 382a2acf33..d7c81236ef 100644
--- a/platform/darwin/src/string_nsstring.mm
+++ b/platform/darwin/src/string_nsstring.mm
@@ -27,32 +27,5 @@ std::string lowercase(const std::string &string) {
return result;
}
-std::string formatNumber(double number, const std::string& localeId, const std::string& currency,
- uint8_t minFractionDigits, uint8_t maxFractionDigits) {
-
- static NSNumberFormatter *numberFormatter;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- numberFormatter = [[NSNumberFormatter alloc] init];
- });
-
- numberFormatter.locale = !localeId.empty() ? [NSLocale localeWithLocaleIdentifier:@(localeId.c_str())] : nil;
- numberFormatter.currencyCode = !currency.empty() ? @(currency.c_str()) : nil;
- if (currency.empty()) {
- numberFormatter.minimumFractionDigits = minFractionDigits;
- numberFormatter.maximumFractionDigits = maxFractionDigits;
- numberFormatter.numberStyle = NSNumberFormatterDecimalStyle;
- } else {
- // Reset fraction digits to NSNumberFormatter's default values, so that the
- // system will choose formatting based on number formatter locale.
- numberFormatter.minimumFractionDigits = 0;
- numberFormatter.maximumFractionDigits = 0;
- numberFormatter.numberStyle = NSNumberFormatterCurrencyStyle;
- }
- NSString *formatted = [numberFormatter stringFromNumber:@(number)];
- std::string result = std::string([formatted UTF8String]);
- return result;
-}
-
-}
-}
+} // namespace platform
+} // namespace mbgl
diff --git a/platform/default/src/mbgl/util/format_number.cpp b/platform/default/src/mbgl/i18n/format_number.cpp
index d1b51e11a1..7b6f24221d 100644
--- a/platform/default/src/mbgl/util/format_number.cpp
+++ b/platform/default/src/mbgl/i18n/format_number.cpp
@@ -1,4 +1,4 @@
-#include <mbgl/util/platform.hpp>
+#include <mbgl/i18n/number_format.hpp>
#include <unicode/numberformatter.h>
diff --git a/platform/default/src/mbgl/i18n/number_format.cpp b/platform/default/src/mbgl/i18n/number_format.cpp
new file mode 100644
index 0000000000..7f2bc5a5ef
--- /dev/null
+++ b/platform/default/src/mbgl/i18n/number_format.cpp
@@ -0,0 +1,41 @@
+#include <mbgl/i18n/number_format.hpp>
+
+#include <unicode/numberformatter.h>
+
+namespace mbgl {
+namespace platform {
+
+std::string formatNumber(double number,
+ const std::string& localeId,
+ const std::string& currency,
+ uint8_t minFractionDigits,
+ uint8_t maxFractionDigits) {
+ UErrorCode status = U_ZERO_ERROR;
+ icu::UnicodeString ustr;
+ std::string formatted;
+
+ icu::Locale locale = icu::Locale(localeId.c_str());
+ // Print the value as currency
+ if (!currency.empty()) {
+ icu::UnicodeString ucurrency = icu::UnicodeString::fromUTF8(currency);
+ ustr = icu::number::NumberFormatter::with()
+ .unit(icu::CurrencyUnit(ucurrency.getBuffer(), status))
+ .locale(locale)
+ .formatDouble(number, status)
+ .toString();
+ } else {
+ ustr = icu::number::NumberFormatter::with()
+#if U_ICU_VERSION_MAJOR_NUM >= 62
+ .precision(icu::number::Precision::minMaxFraction(minFractionDigits, maxFractionDigits))
+#else
+ .rounding(icu::number::Rounder::minMaxFraction(minFractionDigits, maxFractionDigits))
+#endif
+ .locale(locale)
+ .formatDouble(number, status)
+ .toString();
+ }
+ return ustr.toUTF8String(formatted);
+}
+
+} // namespace platform
+} // namespace mbgl
diff --git a/platform/ios/core-files.json b/platform/ios/core-files.json
index c4930b1667..7c916b027b 100644
--- a/platform/ios/core-files.json
+++ b/platform/ios/core-files.json
@@ -7,6 +7,7 @@
"platform/darwin/src/image.mm",
"platform/darwin/src/local_glyph_rasterizer.mm",
"platform/darwin/src/logging_nslog.mm",
+ "platform/darwin/src/number_format.mm",
"platform/darwin/src/nsthread.mm",
"platform/darwin/src/reachability.m",
"platform/darwin/src/string_nsstring.mm",
diff --git a/platform/linux/config.cmake b/platform/linux/config.cmake
index 01c46c9fcb..26de2430ce 100644
--- a/platform/linux/config.cmake
+++ b/platform/linux/config.cmake
@@ -45,17 +45,17 @@ macro(mbgl_platform_core)
PRIVATE platform/linux/src/gl_functions.cpp
# Misc
+ PRIVATE platform/default/src/mbgl/i18n/collator.cpp
+ PRIVATE platform/default/src/mbgl/i18n/number_format.cpp
+ PRIVATE platform/default/src/mbgl/text/bidi.cpp
+ PRIVATE platform/default/src/mbgl/text/local_glyph_rasterizer.cpp
+ PRIVATE platform/default/src/mbgl/layermanager/layer_manager.cpp
PRIVATE platform/default/src/mbgl/util/compression.cpp
PRIVATE platform/default/src/mbgl/util/logging_stderr.cpp
PRIVATE platform/default/src/mbgl/util/string_stdlib.cpp
PRIVATE platform/default/src/mbgl/util/thread.cpp
- PRIVATE platform/default/src/mbgl/text/bidi.cpp
- PRIVATE platform/default/src/mbgl/i18n/collator.cpp
- PRIVATE platform/default/src/mbgl/layermanager/layer_manager.cpp
- PRIVATE platform/default/src/mbgl/text/local_glyph_rasterizer.cpp
PRIVATE platform/default/src/mbgl/util/thread_local.cpp
PRIVATE platform/default/src/mbgl/util/utf.cpp
- PRIVATE platform/default/src/mbgl/util/format_number.cpp
# Image handling
PRIVATE platform/default/src/mbgl/util/image.cpp
@@ -86,7 +86,7 @@ macro(mbgl_platform_core)
target_add_mason_package(mbgl-core PRIVATE icu)
# Ignore warning caused by ICU header unistr.h in some CI environments
- set_source_files_properties(platform/default/src/mbgl/util/format_number.cpp PROPERTIES COMPILE_FLAGS -Wno-error=shadow)
+ set_source_files_properties(platform/default/src/mbgl/i18n/number_format.cpp PROPERTIES COMPILE_FLAGS -Wno-error=shadow)
# Link all ICU libraries (by default only libicuuc is linked)
find_library(LIBICUI18N NAMES icui18n HINTS ${MASON_PACKAGE_icu_INCLUDE_DIRS}/../lib)
diff --git a/platform/macos/core-files.json b/platform/macos/core-files.json
index 21b0e698f0..b0536c4863 100644
--- a/platform/macos/core-files.json
+++ b/platform/macos/core-files.json
@@ -7,6 +7,7 @@
"platform/darwin/src/local_glyph_rasterizer.mm",
"platform/darwin/src/logging_nslog.mm",
"platform/darwin/src/nsthread.mm",
+ "platform/darwin/src/number_format.mm",
"platform/darwin/src/reachability.m",
"platform/darwin/src/string_nsstring.mm",
"platform/default/src/mbgl/gfx/headless_backend.cpp",
diff --git a/platform/qt/src/format_number.cpp b/platform/qt/src/number_format.cpp
index b6fe3558e6..b6fe3558e6 100644
--- a/platform/qt/src/format_number.cpp
+++ b/platform/qt/src/number_format.cpp
diff --git a/src/core-files.json b/src/core-files.json
index 2f609e92ec..a460ab86df 100644
--- a/src/core-files.json
+++ b/src/core-files.json
@@ -333,6 +333,8 @@
"mbgl/gfx/renderer_backend.hpp": "include/mbgl/gfx/renderer_backend.hpp",
"mbgl/gl/renderable_resource.hpp": "include/mbgl/gl/renderable_resource.hpp",
"mbgl/gl/renderer_backend.hpp": "include/mbgl/gl/renderer_backend.hpp",
+ "mbgl/i18n/collator.hpp": "include/mbgl/i18n/collator.hpp",
+ "mbgl/i18n/number_format.hpp": "include/mbgl/i18n/number_format.hpp",
"mbgl/layermanager/background_layer_factory.hpp": "include/mbgl/layermanager/background_layer_factory.hpp",
"mbgl/layermanager/circle_layer_factory.hpp": "include/mbgl/layermanager/circle_layer_factory.hpp",
"mbgl/layermanager/custom_layer_factory.hpp": "include/mbgl/layermanager/custom_layer_factory.hpp",
diff --git a/src/mbgl/style/expression/number_format.cpp b/src/mbgl/style/expression/number_format.cpp
index e31a9ce398..c2de032ff4 100644
--- a/src/mbgl/style/expression/number_format.cpp
+++ b/src/mbgl/style/expression/number_format.cpp
@@ -1,6 +1,6 @@
-#include <mbgl/style/expression/number_format.hpp>
+#include <mbgl/i18n/number_format.hpp>
#include <mbgl/style/conversion_impl.hpp>
-#include <mbgl/util/platform.hpp>
+#include <mbgl/style/expression/number_format.hpp>
namespace mbgl {
namespace style {