mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-13725 Responding to small code review comments.
X-SVN-Rev: 41283
This commit is contained in:
parent
c13e7785c2
commit
d5253cfcae
2 changed files with 3 additions and 3 deletions
|
@ -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 + 1); // i.e., -result
|
||||
return static_cast<int64_t>(0LL - result); // i.e., -result
|
||||
}
|
||||
return static_cast<int64_t>(result);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// © 2018 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cmath>
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
@ -11,6 +9,8 @@
|
|||
// Helpful in toString methods and elsewhere.
|
||||
#define UNISTR_FROM_STRING_EXPLICIT
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cmath>
|
||||
#include "number_types.h"
|
||||
#include "number_utils.h"
|
||||
#include "charstr.h"
|
||||
|
|
Loading…
Add table
Reference in a new issue