OLD | NEW |
1 diff --git a/source/common/locmap.c b/source/common/locmap.c | 1 diff --git a/source/common/locmap.c b/source/common/locmap.c |
2 index 59809c6..927041b 100644 | 2 index c746ce3..224a2b1 100644 |
3 --- a/source/common/locmap.c | 3 --- a/source/common/locmap.c |
4 +++ b/source/common/locmap.c | 4 +++ b/source/common/locmap.c |
5 @@ -29,6 +29,7 @@ | 5 @@ -29,6 +29,7 @@ |
6 #include "cstring.h" | 6 #include "cstring.h" |
7 #include "cmemory.h" | 7 #include "cmemory.h" |
8 | 8 |
9 +#if 0 | 9 +#if 0 |
10 #if U_PLATFORM == U_PF_WINDOWS && defined(_MSC_VER) && (_MSC_VER >= 1500) | 10 #if U_PLATFORM == U_PF_WINDOWS && defined(_MSC_VER) && (_MSC_VER >= 1500) |
11 /* | 11 /* |
12 * TODO: It seems like we should widen this to | 12 * TODO: It seems like we should widen this to |
(...skipping 17 matching lines...) Expand all Loading... |
30 + * static const class variable. However, the C++ standard states that this | 30 + * static const class variable. However, the C++ standard states that this |
31 + * definition is correct. Perhaps there is a bug in the Microsoft compiler. | 31 + * definition is correct. Perhaps there is a bug in the Microsoft compiler. |
32 + * This is not an issue on any other compilers (that we know of). | 32 + * This is not an issue on any other compilers (that we know of). |
33 + * Cygwin with MSVC 9.0 also complains here about redefinition. | 33 + * Cygwin with MSVC 9.0 also complains here about redefinition. |
34 + */ | 34 + */ |
35 +#if (!defined(_MSC_VER) || (_MSC_VER > 1800)) && !defined(CYGWINMSVC) | 35 +#if (!defined(_MSC_VER) || (_MSC_VER > 1800)) && !defined(CYGWINMSVC) |
36 const int32_t StringPiece::npos = 0x7fffffff; | 36 const int32_t StringPiece::npos = 0x7fffffff; |
37 +#endif | 37 +#endif |
38 | 38 |
39 U_NAMESPACE_END | 39 U_NAMESPACE_END |
40 diff --git a/source/i18n/collationfastlatin.cpp b/source/i18n/collationfastlatin
.cpp | |
41 index 0b26d1d..dc654a3 100644 | |
42 --- a/source/i18n/collationfastlatin.cpp | |
43 +++ b/source/i18n/collationfastlatin.cpp | |
44 @@ -39,10 +39,10 @@ CollationFastLatin::getOptions(const CollationData *data, co
nst CollationSetting | |
45 uint32_t v1 = settings.variableTop >> 24; | |
46 int32_t headerLength = *table & 0xff; | |
47 int32_t i = headerLength - 1; | |
48 - if(i <= 0 || v1 > (table[i] & 0x7f)) { | |
49 + if(i <= 0 || v1 > (table[i] & 0x7fu)) { | |
50 return -1; // variableTop >= digits, should not occur | |
51 } | |
52 - while(i > 1 && v1 <= (table[i - 1] & 0x7f)) { --i; } | |
53 + while(i > 1 && v1 <= (table[i - 1] & 0x7fu)) { --i; } | |
54 // In the table header, the miniVarTop is in bits 15..7, with 4 zero bi
ts 19..16 implied. | |
55 // Shift right to make it comparable with long mini primaries in bits 1
5..3. | |
56 miniVarTop = (table[i] & 0xff80) >> 4; | |
57 diff --git a/source/i18n/decimfmt.cpp b/source/i18n/decimfmt.cpp | |
58 index da1f8d2..825651b 100644 | |
59 --- a/source/i18n/decimfmt.cpp | |
60 +++ b/source/i18n/decimfmt.cpp | |
61 @@ -1450,7 +1450,7 @@ DecimalFormat::_format(int64_t number, | |
62 // Slide the number to the start of the output str | |
63 U_ASSERT(destIdx >= 0); | |
64 int32_t length = MAX_IDX - destIdx -1; | |
65 - /*int32_t prefixLen = */ appendAffix(appendTo, number, handler, number<0, T
RUE); | |
66 + /*int32_t prefixLen = */ appendAffix(appendTo, static_cast<double>(number),
handler, number<0, TRUE); | |
67 int32_t maxIntDig = getMaximumIntegerDigits(); | |
68 int32_t destlength = length<=maxIntDig?length:maxIntDig; // dest length pin
ned to max int digits | |
69 | |
70 @@ -1474,7 +1474,7 @@ DecimalFormat::_format(int64_t number, | |
71 destlength); | |
72 handler.addAttribute(kIntegerField, intBegin, appendTo.length()); | |
73 | |
74 - /*int32_t suffixLen =*/ appendAffix(appendTo, number, handler, number<0, FA
LSE); | |
75 + /*int32_t suffixLen =*/ appendAffix(appendTo, static_cast<double>(number),
handler, number<0, FALSE); | |
76 | |
77 //outputStr[length]=0; | |
78 | |
79 diff --git a/source/i18n/digitlst.cpp b/source/i18n/digitlst.cpp | |
80 index b0e6010..8de7324 100644 | |
81 --- a/source/i18n/digitlst.cpp | |
82 +++ b/source/i18n/digitlst.cpp | |
83 @@ -704,7 +704,7 @@ DigitList::set(int64_t source) | |
84 U_ASSERT(uprv_strlen(str) < sizeof(str)); | |
85 | |
86 uprv_decNumberFromString(fDecNumber, str, &fContext); | |
87 - internalSetDouble(source); | |
88 + internalSetDouble(static_cast<double>(source)); | |
89 } | |
90 | |
91 /** | |
92 diff --git a/source/i18n/regexcmp.cpp b/source/i18n/regexcmp.cpp | |
93 index 0c2196f..ea01d5a 100644 | |
94 --- a/source/i18n/regexcmp.cpp | |
95 +++ b/source/i18n/regexcmp.cpp | |
96 @@ -3471,7 +3471,7 @@ int32_t RegexCompile::maxMatchLength(int32_t start, int3
2_t end) { | |
97 break; | |
98 } | |
99 | |
100 - int32_t maxLoopCount = fRXPat->fCompiledPat->elementAti(loc+3); | |
101 + int32_t maxLoopCount = static_cast<int32_t>(fRXPat->fCompiledPa
t->elementAti(loc+3)); | |
102 if (maxLoopCount == -1) { | |
103 // Unbounded Loop. No upper bound on match length. | |
104 currentLen = INT32_MAX; | |
OLD | NEW |