ICU-20438 Adding additional ICU patches to double-conversion.
This commit is contained in:
parent
6a58ebdd51
commit
ae13af0a8e
@ -34,8 +34,10 @@
|
||||
#include "unicode/utypes.h"
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
// ICU PATCH: Do not include std::locale.
|
||||
|
||||
#include <climits>
|
||||
#include <locale>
|
||||
//#include <locale>
|
||||
#include <cmath>
|
||||
|
||||
// ICU PATCH: Customize header file paths for ICU.
|
||||
@ -436,9 +438,14 @@ void DoubleToStringConverter::DoubleToAscii(double v,
|
||||
namespace {
|
||||
|
||||
inline char ToLower(char ch) {
|
||||
#if 0 // do not include std::locale in ICU
|
||||
static const std::ctype<char>& cType =
|
||||
std::use_facet<std::ctype<char> >(std::locale::classic());
|
||||
return cType.tolower(ch);
|
||||
#else
|
||||
(void)ch;
|
||||
UNREACHABLE();
|
||||
#endif
|
||||
}
|
||||
|
||||
inline char Pass(char ch) {
|
||||
|
@ -544,7 +544,9 @@ class StringToDoubleConverter {
|
||||
junk_string_value_(junk_string_value),
|
||||
infinity_symbol_(infinity_symbol),
|
||||
nan_symbol_(nan_symbol),
|
||||
separator_(separator) {
|
||||
// ICU PATCH: Convert the u16 to a char.
|
||||
// This patch should be removed when upstream #89 is fixed.
|
||||
separator_(static_cast<char>(separator)) {
|
||||
}
|
||||
|
||||
// Performs the conversion.
|
||||
@ -579,7 +581,10 @@ class StringToDoubleConverter {
|
||||
const double junk_string_value_;
|
||||
const char* const infinity_symbol_;
|
||||
const char* const nan_symbol_;
|
||||
const uc16 separator_;
|
||||
|
||||
// ICU PATCH: Avoid warnings by making this a char instead of a u16.
|
||||
// This patch should be removed when upstream #89 is fixed.
|
||||
const char separator_;
|
||||
|
||||
template <class Iterator>
|
||||
double StringToIeee(Iterator start_pointer,
|
||||
|
4
vendor/double-conversion/UPDATING.md
vendored
4
vendor/double-conversion/UPDATING.md
vendored
@ -19,6 +19,10 @@ After completing the first step, the script will stop again and ask you whether
|
||||
|
||||
Make note of the output of the command. If there are any merge conflicts, you will need to resolve them manually.
|
||||
|
||||
## Checking ICU Patches
|
||||
|
||||
Look over any ICU patches in the icu4c/i18n version of the code files; they should be marked clearly with "ICU PATCH" comments. Make sure that the patches are still needed and remove them if possible.
|
||||
|
||||
## Next Steps
|
||||
|
||||
Build and test icu4c, and send the PR for review.
|
||||
|
Loading…
Reference in New Issue
Block a user