ICU-13725 Additional MSVC compatibility fixes.

X-SVN-Rev: 41278
This commit is contained in:
Shane Carr 2018-04-25 21:51:16 +00:00
parent 9ba0aa2345
commit 18ffd64c69
2 changed files with 2 additions and 1 deletions

View File

@ -511,7 +511,7 @@ int64_t DecimalQuantity::toLong(bool truncateIfOverflow) const {
result = result * 10 + getDigitPos(magnitude - scale);
}
if (isNegative()) {
return static_cast<int64_t>(-result);
return static_cast<int64_t>(~result + 1); // i.e., -result
}
return static_cast<int64_t>(result);
}

View File

@ -67,6 +67,7 @@ const char16_t* utils::getPatternForStyle(const Locale& locale, const char* nsNa
patternKey = "scientificFormat";
break;
default:
patternKey = "decimalFormat"; // silence compiler error
U_ASSERT(false);
}
LocalUResourceBundlePointer res(ures_open(nullptr, locale.getName(), &status));