const-ref tokens in loop since they aren't modified here

This commit is contained in:
2024-06-28 13:09:26 -04:00
parent abb9eed60f
commit f74b97ac11

View File

@@ -58,7 +58,7 @@ namespace jlog
std::string toks2msg(std::vector<token> tokens, std::function<std::string(token)> formatter)
{
std::string msg;
for (token t: tokens)
for (const token& t: tokens)
{
msg += formatter(t);
}