version 1.37, 2002/03/20 03:21:07
|
version 1.38, 2002/03/20 17:47:07
|
|
|
| |
while (first != last) | while (first != last) |
{ | { |
if (x < -922337203685477580 /* -(1<<63) / 10 */) |
if (x < -922337203685477580LL /* -(1<<63) / 10 */) |
{ | { |
return false; | return false; |
} | } |
x = 10 * x; | x = 10 * x; |
Sint64 newDigit = (*first++ - '0'); | Sint64 newDigit = (*first++ - '0'); |
if (-9223372036854775808 - x > -newDigit) |
if (PEGASUS_LLONG_MIN - x > -newDigit) |
{ | { |
return false; | return false; |
} | } |
|
|
| |
if (!negative) | if (!negative) |
{ | { |
if (x == -9223372036854775808) |
if (x == PEGASUS_LLONG_MIN) |
{ | { |
return false; | return false; |
} | } |
|
|
| |
while (first != last) | while (first != last) |
{ | { |
if (x > 1844674407370955161 /* (1<<64 - 1) / 10 */) |
if (x > 1844674407370955161ULL /* (1<<64 - 1) / 10 */) |
{ | { |
return false; | return false; |
} | } |
x = 10 * x; | x = 10 * x; |
Uint64 newDigit = (*first++ - '0'); | Uint64 newDigit = (*first++ - '0'); |
if (18446744073709551615 - x < newDigit) |
if (18446744073709551615ULL - x < newDigit) |
{ | { |
return false; | return false; |
} | } |