Speed up FString::setNumber() by using a decimal string lookup table
This commit is contained in:
parent
09d6c2879d
commit
0c3668573d
|
@ -1,3 +1,7 @@
|
|||
2017-04-17 Markus Gans <guru.mail@muenster.de>
|
||||
* Speed up FString::setNumber() by using a decimal
|
||||
string lookup table
|
||||
|
||||
2017-04-15 Markus Gans <guru.mail@muenster.de>
|
||||
* Fix unsigned integer underflow in FString::_insert()
|
||||
|
||||
|
|
|
@ -1015,7 +1015,7 @@ FString& FString::setNumber (long num)
|
|||
|
||||
do
|
||||
{
|
||||
*--s = wchar_t(int(num%10) + '0');
|
||||
*--s = L"0123456789"[num % 10];
|
||||
num /= 10;
|
||||
}
|
||||
while ( num );
|
||||
|
@ -1038,7 +1038,7 @@ FString& FString::setNumber (uLong num)
|
|||
|
||||
do
|
||||
{
|
||||
*--s = wchar_t(int(num%10) + '0');
|
||||
*--s = L"0123456789"[num % 10];
|
||||
num /= 10;
|
||||
}
|
||||
while ( num );
|
||||
|
@ -1102,7 +1102,7 @@ FString& FString::setFormatedNumber (long num, char separator)
|
|||
|
||||
do
|
||||
{
|
||||
*--s = wchar_t(int(num%10) + '0');
|
||||
*--s = L"0123456789"[num % 10];
|
||||
num /= 10;
|
||||
|
||||
if ( num && ++n % 3 == 0 )
|
||||
|
@ -1133,7 +1133,7 @@ FString& FString::setFormatedNumber (uLong num, char separator)
|
|||
|
||||
do
|
||||
{
|
||||
*--s = wchar_t(int(num%10) + '0');
|
||||
*--s = L"0123456789"[num % 10];
|
||||
num /= 10;
|
||||
|
||||
if ( num && ++n % 3 == 0 )
|
||||
|
|
Loading…
Reference in New Issue