]> git.sesse.net Git - stockfish/blobdiff - src/ucioption.cpp
Retire push_button() and button_was_pressed()
[stockfish] / src / ucioption.cpp
index e1b5ae552900b310f61db930caf85d53eb73fb1e..2db1beeba31a11305fe7a4cb15ed09e6c62f8a99 100644 (file)
@@ -286,7 +286,7 @@ void set_option_value(const string& name, const string& value) {
   if (opt.type == CHECK && v != "0" && v != "1")
       return;
 
-  else if (opt.type == SPIN)
+  if (opt.type == SPIN)
   {
       int val = atoi(v.c_str());
       if (val < opt.minValue || val > opt.maxValue)
@@ -294,26 +294,3 @@ void set_option_value(const string& name, const string& value) {
   }
   opt.currentValue = v;
 }
-
-
-/// push_button() is used to tell the engine that a UCI parameter of type
-/// "button" has been selected:
-
-void push_button(const string& buttonName) {
-
-  set_option_value(buttonName, "true");
-}
-
-
-/// button_was_pressed() tests whether a UCI parameter of type "button" has
-/// been selected since the last time the function was called, in this case
-/// it also resets the button.
-
-bool button_was_pressed(const string& buttonName) {
-
-  if (!get_option_value<bool>(buttonName))
-      return false;
-
-  set_option_value(buttonName, "false");
-  return true;
-}