ICU-13725 Additional MSVC compatibility fixes.
X-SVN-Rev: 41278
This commit is contained in:
parent
9ba0aa2345
commit
18ffd64c69
@ -511,7 +511,7 @@ int64_t DecimalQuantity::toLong(bool truncateIfOverflow) const {
|
|||||||
result = result * 10 + getDigitPos(magnitude - scale);
|
result = result * 10 + getDigitPos(magnitude - scale);
|
||||||
}
|
}
|
||||||
if (isNegative()) {
|
if (isNegative()) {
|
||||||
return static_cast<int64_t>(-result);
|
return static_cast<int64_t>(~result + 1); // i.e., -result
|
||||||
}
|
}
|
||||||
return static_cast<int64_t>(result);
|
return static_cast<int64_t>(result);
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,7 @@ const char16_t* utils::getPatternForStyle(const Locale& locale, const char* nsNa
|
|||||||
patternKey = "scientificFormat";
|
patternKey = "scientificFormat";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
patternKey = "decimalFormat"; // silence compiler error
|
||||||
U_ASSERT(false);
|
U_ASSERT(false);
|
||||||
}
|
}
|
||||||
LocalUResourceBundlePointer res(ures_open(nullptr, locale.getName(), &status));
|
LocalUResourceBundlePointer res(ures_open(nullptr, locale.getName(), &status));
|
||||||
|
Loading…
Reference in New Issue
Block a user