]> git.sesse.net Git - stockfish/commitdiff
Reduce indentation in UCIOption::operator=()
authorMarco Costalba <mcostalba@gmail.com>
Sun, 24 Jun 2012 23:14:42 +0000 (00:14 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 24 Jun 2012 23:14:42 +0000 (00:14 +0100)
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/ucioption.cpp

index 4761004d735555696f5c22d1b60ff55e190a5fff..763db556654e4c87828854bc7290d056ba8038da 100644 (file)
@@ -138,14 +138,14 @@ void UCIOption::operator=(const string& v) {
 
   assert(!type.empty());
 
 
   assert(!type.empty());
 
-  if (   (type == "button" || !v.empty())
-      && (type != "check"  || (v == "true" || v == "false"))
-      && (type != "spin"   || (atoi(v.c_str()) >= min && atoi(v.c_str()) <= max)))
-  {
-      if (type != "button")
-          currentValue = v;
-
-      if (on_change)
-          (*on_change)(*this);
-  }
+  if (   (type != "button" && v.empty())
+      || (type == "check" && v != "true" && v != "false")
+      || (type == "spin" && (atoi(v.c_str()) < min || atoi(v.c_str()) > max)))
+      return;
+
+  if (type != "button")
+      currentValue = v;
+
+  if (on_change)
+      (*on_change)(*this);
 }
 }