From 449ac2a19ab4aafc1413a874dc7ba995eabd744a Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 19 Mar 2016 22:22:57 +0100 Subject: [PATCH] Put the root into a separate place. --- src/hashprobe.proto | 1 + src/main.cpp | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) 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) { -- 2.39.2