summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2019-07-30 20:23:41 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2019-07-30 20:23:41 +0300
commit75abcd0b4a5e3161082d3c5d0fe306d7719cb229 (patch)
tree9ea7605eef4ed0afe6145c6b3e1fc77a2c9deca3
parentf86f0226dd7f87fef97378cff225754ae5d69c90 (diff)
downloadqtlocation-mapboxgl-75abcd0b4a5e3161082d3c5d0fe306d7719cb229.tar.gz
[XXX] ICU hack
-rw-r--r--platform/default/src/mbgl/util/format_number.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/platform/default/src/mbgl/util/format_number.cpp b/platform/default/src/mbgl/util/format_number.cpp
index 7cc863818a..00b10a042a 100644
--- a/platform/default/src/mbgl/util/format_number.cpp
+++ b/platform/default/src/mbgl/util/format_number.cpp
@@ -1,6 +1,10 @@
#include <mbgl/util/platform.hpp>
+#if 0
#include <unicode/numberformatter.h>
+#else
+#include <mbgl/util/string.hpp>
+#endif
namespace mbgl {
namespace platform {
@@ -8,6 +12,7 @@ namespace platform {
std::string formatNumber(double number, const std::string& localeId, const std::string& currency,
uint8_t minFractionDigits, uint8_t maxFractionDigits) {
+#if 0
UErrorCode status = U_ZERO_ERROR;
icu::UnicodeString ustr;
std::string formatted;
@@ -29,6 +34,13 @@ std::string formatNumber(double number, const std::string& localeId, const std::
.toString();
}
return ustr.toUTF8String(formatted);
+#else
+ (void)localeId;
+ (void)currency;
+ (void)minFractionDigits;
+ (void)maxFractionDigits;
+ return mbgl::util::toString(number);
+#endif
}
} // namespace platform