]> git.sesse.net Git - stockfish/commitdiff
Remove the non-pretty moves from the protobuf, as it takes up a little CPU time for...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 20 Nov 2016 22:07:51 +0000 (23:07 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 24 Nov 2018 10:17:41 +0000 (11:17 +0100)
src/client.cpp
src/main.cpp

index a57879050bf0164b61ee14c2b662e3b61eac5818..a59b961ad9736ac73ca68d85f0d6c0347906499e 100644 (file)
@@ -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();
 }
 
index 2117497f2436be1173235d5e782039feab59677d..3e6369a805e272a5af6a62e4d390a5f4d1739062 100644 (file)
@@ -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;