mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Prefer operator<<() to pretty()
It is more idiomatic, we didn't used it in the past because Position::pretty(Move) had a calling argument, but now we can. As an added benefit, we avoid a lot of string copies in the process because now we avoid std::ostringstream ss. No functional change.
This commit is contained in:
@@ -203,7 +203,7 @@ void UCI::loop(int argc, char* argv[]) {
|
||||
else if (token == "setoption") setoption(is);
|
||||
else if (token == "flip") pos.flip();
|
||||
else if (token == "bench") benchmark(pos, is);
|
||||
else if (token == "d") sync_cout << pos.pretty() << sync_endl;
|
||||
else if (token == "d") sync_cout << pos << sync_endl;
|
||||
else if (token == "isready") sync_cout << "readyok" << sync_endl;
|
||||
else if (token == "eval") sync_cout << Eval::trace(pos) << sync_endl;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user