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:
Marco Costalba
2014-11-01 18:50:27 +01:00
parent d07a875398
commit 5644e14d0e
3 changed files with 29 additions and 29 deletions

View File

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