]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Retire push_button() and button_was_pressed()
[stockfish] / src / search.cpp
index 9649c2da76b269d00ae9380e1fbfd4c018883fbb..c5c8b839db343d9ec4396e2f74d759965465aa4c 100644 (file)
@@ -425,8 +425,11 @@ bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[
 
   // Read UCI option values
   TT.set_size(get_option_value_int("Hash"));
-  if (button_was_pressed("Clear Hash"))
+  if (get_option_value_bool("Clear Hash"))
+  {
+      set_option_value("Clear Hash", "false");
       TT.clear();
+  }
 
   CheckExtension[1]         = Depth(get_option_value_int("Check Extension (PV nodes)"));
   CheckExtension[0]         = Depth(get_option_value_int("Check Extension (non-PV nodes)"));