ICU-11461 Remove unused setInteger functionality from DigitList
X-SVN-Rev: 38131
This commit is contained in:
parent
4c96f9a866
commit
0b2778f3bb
@ -118,9 +118,7 @@ DigitList::operator=(const DigitList& other)
|
||||
Mutex mutex;
|
||||
|
||||
if(other.fHave==kDouble) {
|
||||
fUnion.fDouble = other.fUnion.fDouble;
|
||||
} else if(other.fHave==kInt64) {
|
||||
fUnion.fInt64 = other.fUnion.fInt64;
|
||||
fUnion.fDouble = other.fUnion.fDouble;
|
||||
}
|
||||
fHave = other.fHave;
|
||||
}
|
||||
@ -436,8 +434,6 @@ DigitList::getDouble() const
|
||||
Mutex mutex;
|
||||
if (fHave == kDouble) {
|
||||
return fUnion.fDouble;
|
||||
} else if(fHave == kInt64) {
|
||||
return (double)fUnion.fInt64;
|
||||
}
|
||||
decimalSeparator = gDecimal;
|
||||
}
|
||||
@ -537,9 +533,8 @@ int32_t DigitList::getLong() /*const*/
|
||||
* Return zero if the number cannot be represented.
|
||||
*/
|
||||
int64_t DigitList::getInt64() /*const*/ {
|
||||
if(fHave==kInt64) {
|
||||
return fUnion.fInt64;
|
||||
}
|
||||
// TODO: fast conversion if fHave == fDouble
|
||||
|
||||
// Truncate if non-integer.
|
||||
// Return 0 if out of range.
|
||||
// Range of in64_t is -9223372036854775808 to 9223372036854775807 (19 digits)
|
||||
@ -729,17 +724,6 @@ DigitList::set(int64_t source)
|
||||
internalSetDouble(static_cast<double>(source));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set an int64, with no decnumber
|
||||
*/
|
||||
void
|
||||
DigitList::setInteger(int64_t source)
|
||||
{
|
||||
fDecNumber=NULL;
|
||||
internalSetInt64(source);
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------
|
||||
/**
|
||||
* Set the DigitList from a decimal number string.
|
||||
|
@ -477,8 +477,7 @@ private:
|
||||
} fUnion;
|
||||
enum EHave {
|
||||
kNone=0,
|
||||
kDouble,
|
||||
kInt64
|
||||
kDouble
|
||||
} fHave;
|
||||
|
||||
|
||||
@ -513,10 +512,6 @@ private:
|
||||
fHave = kDouble;
|
||||
fUnion.fDouble=d;
|
||||
}
|
||||
inline void internalSetInt64(int64_t d) {
|
||||
fHave = kInt64;
|
||||
fUnion.fInt64=d;
|
||||
}
|
||||
inline void internalClear() {
|
||||
fHave = kNone;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user