]> git.sesse.net Git - stockfish/blobdiff - src/ucioption.cpp
Simplify set_option()
[stockfish] / src / ucioption.cpp
index c7883d4ca62762046fd621895a62337639fa5228..cd59c9310042a425a4fd2b9525b132e24947e9d4 100644 (file)
@@ -163,8 +163,11 @@ void Option::set_value(const string& value) {
 
   assert(!type.empty());
 
-  if (    (type == "check" || type == "button")
-      && !(value == "true" || value == "false"))
+  if (value.empty())
+      return;
+
+  if (   (type == "check" || type == "button")
+      != (value == "true" || value == "false"))
       return;
 
   if (type == "spin")