diff options
author | Preston A Elder <pelder@gmail.com> | 2020-02-04 12:23:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-04 12:23:57 -0500 |
commit | c28ffe0d4a32c4296ea1a46c3467aeaacf67559d (patch) | |
tree | 5a867e96b965e7eab8163e19768068b9db0b2ae4 /platform | |
parent | 86cd344bbe9634a3e6cfe13b62d59f529c7ab17f (diff) | |
download | qtlocation-mapboxgl-c28ffe0d4a32c4296ea1a46c3467aeaacf67559d.tar.gz |
Made number format work for newer versions of ICU (#16176)
Diffstat (limited to 'platform')
-rw-r--r-- | platform/default/src/mbgl/i18n/number_format.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/default/src/mbgl/i18n/number_format.cpp b/platform/default/src/mbgl/i18n/number_format.cpp index 7f2bc5a5ef..ded4495202 100644 --- a/platform/default/src/mbgl/i18n/number_format.cpp +++ b/platform/default/src/mbgl/i18n/number_format.cpp @@ -22,7 +22,11 @@ std::string formatNumber(double number, .unit(icu::CurrencyUnit(ucurrency.getBuffer(), status)) .locale(locale) .formatDouble(number, status) +#if U_ICU_VERSION_MAJOR_NUM >= 62 + .toString(status); +#else .toString(); +#endif } else { ustr = icu::number::NumberFormatter::with() #if U_ICU_VERSION_MAJOR_NUM >= 62 @@ -32,7 +36,11 @@ std::string formatNumber(double number, #endif .locale(locale) .formatDouble(number, status) +#if U_ICU_VERSION_MAJOR_NUM >= 62 + .toString(status); +#else .toString(); +#endif } return ustr.toUTF8String(formatted); } |