enhance performance: preallocate memory when reading token

This commit is contained in:
jerrrrycho
2026-01-29 15:23:05 +01:00
parent 67ac998814
commit 46867423e9

View File

@@ -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;