Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Made number format work for newer versions of ICU (#16176)
Browse files Browse the repository at this point in the history
  • Loading branch information
corporategoth authored Feb 4, 2020
1 parent 86cd344 commit c28ffe0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions platform/default/src/mbgl/i18n/number_format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
Expand Down

0 comments on commit c28ffe0

Please sign in to comment.