Avoid unnecessary string copies

closes https://github.com/official-stockfish/Stockfish/pull/4326

also fixes typo, closes https://github.com/official-stockfish/Stockfish/pull/4332

No functional change
This commit is contained in:
Sebastian Buchwald
2023-01-06 18:13:21 +01:00
committed by Joost VandeVondele
parent e9e7a7b83f
commit 4f4e652eca
3 changed files with 3 additions and 3 deletions

View File

@@ -160,7 +160,7 @@ namespace {
uint64_t num, nodes = 0, cnt = 1;
vector<string> list = setup_bench(pos, args);
num = count_if(list.begin(), list.end(), [](string s) { return s.find("go ") == 0 || s.find("eval") == 0; });
num = count_if(list.begin(), list.end(), [](const string& s) { return s.find("go ") == 0 || s.find("eval") == 0; });
TimePoint elapsed = now();