From: Steinar H. Gunderson Date: Sun, 20 Nov 2016 22:07:51 +0000 (+0100) Subject: Remove the non-pretty moves from the protobuf, as it takes up a little CPU time for... X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=775417fcee5cdca67bf72e4b4ed3372470b7be2c Remove the non-pretty moves from the protobuf, as it takes up a little CPU time for the JavaScript to decode. --- diff --git a/src/client.cpp b/src/client.cpp index a5787905..a59b961a 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -14,7 +14,7 @@ using grpc::Status; using namespace hashprobe; std::string FormatMove(const HashProbeMove &move) { - if (move.from_sq().empty()) return "MOVE_NONE"; + if (move.pretty().empty()) return "MOVE_NONE"; return move.pretty(); } diff --git a/src/main.cpp b/src/main.cpp index 2117497f..3e6369a8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -81,13 +81,6 @@ void HashProbeImpl::FillMove(Position *pos, Move move, HashProbeMove* decoded) { if (type_of(move) == CASTLING) { to = make_square(to > from ? FILE_G : FILE_C, rank_of(from)); } - - decoded->set_from_sq(UCI::square(from)); - decoded->set_to_sq(UCI::square(to)); - - if (type_of(move) == PROMOTION) { - decoded->set_promotion(std::string() + " PNBRQK"[promotion_type(move)]); - } Piece moved_piece = pos->moved_piece(move); std::string pretty;