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

@@ -89,7 +89,7 @@ namespace Eval {
vector<string> dirs = { "<internal>" , "" , CommandLine::binaryDirectory };
#endif
for (string directory : dirs)
for (const string& directory : dirs)
if (currentEvalFileName != eval_file)
{
if (directory != "<internal>")