mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 06:55:02 +01:00
Merge pull request #45 from jerrrrycho/parser-enhancements
enhance performance: preallocate memory when reading token
This commit is contained in:
@@ -233,7 +233,7 @@ std::string cParser::readTokenFromDelegate(bool ToLower, const char *Break)
|
||||
std::string cParser::readTokenFromStream(bool ToLower, const char *Break)
|
||||
{
|
||||
std::string token;
|
||||
// get the token yourself if the delegation attempt failed
|
||||
token.reserve(64);
|
||||
|
||||
const auto breakTable = makeBreakTable(Break);
|
||||
char c = 0;
|
||||
|
||||
Reference in New Issue
Block a user