From: Steinar H. Gunderson Date: Sat, 19 Mar 2016 21:22:57 +0000 (+0100) Subject: Put the root into a separate place. X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=449ac2a19ab4aafc1413a874dc7ba995eabd744a Put the root into a separate place. --- diff --git a/src/hashprobe.proto b/src/hashprobe.proto index b02a7a92..42f6b2b4 100644 --- a/src/hashprobe.proto +++ b/src/hashprobe.proto @@ -5,6 +5,7 @@ message HashProbeRequest { string fen = 1; } message HashProbeResponse { + HashProbeLine root = 2; repeated HashProbeLine line = 1; } message HashProbeLine { diff --git a/src/main.cpp b/src/main.cpp index 299b4135..d851bda0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -54,8 +54,7 @@ public: bool invert = (pos.side_to_move() == BLACK); Search::StateStackPtr setup_states = Search::StateStackPtr(new std::stack); - HashProbeLine *root_line = response->add_line(); - ProbeMove(&pos, setup_states.get(), invert, root_line); + ProbeMove(&pos, setup_states.get(), invert, response->mutable_root()); MoveList moves(pos); for (const ExtMove* em = moves.begin(); em != moves.end(); ++em) {