mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
General beast update, fixes, optimizations, features:
* Clean ups, optimizations, and new File::commonDocumentsDirectory enum * Replace sortArray with std::sort for performance * More error tolerance in XML parser, speedups * Refactor some byte-order mark detection code * Add String::appendCharPointer overloads * More XML parser optimisations and better error detection * Misc performance tweaks * Fixes for support of non utf8 strings * Increased precision when storing strings in XmlElement * Minor clean-ups * Minor fix to XmlDocument * Cleanups to CriticalSection and related synchronization primitives * Fix DynamicArray unit test
This commit is contained in:
@@ -951,7 +951,9 @@ String BigInteger::toString (const int base, const int minimumNumCharacters) con
|
||||
void BigInteger::parseString (const String& text, const int base)
|
||||
{
|
||||
clear();
|
||||
String::CharPointerType t (text.getCharPointer());
|
||||
String::CharPointerType t (text.getCharPointer().findEndOfWhitespace ());
|
||||
|
||||
setNegative (*t == (beast_wchar) '-');
|
||||
|
||||
if (base == 2 || base == 8 || base == 16)
|
||||
{
|
||||
@@ -992,8 +994,6 @@ void BigInteger::parseString (const String& text, const int base)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setNegative (text.trimStart().startsWithChar ('-'));
|
||||
}
|
||||
|
||||
MemoryBlock BigInteger::toMemoryBlock() const
|
||||
|
||||
Reference in New Issue
Block a user