From: Marco Costalba Date: Sun, 24 Jun 2012 23:14:42 +0000 (+0100) Subject: Reduce indentation in UCIOption::operator=() X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=ebe8009affa34708bac1e8b69cf5b925ffe5cc82 Reduce indentation in UCIOption::operator=() No functional change. Signed-off-by: Marco Costalba --- diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 4761004d..763db556 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -138,14 +138,14 @@ void UCIOption::operator=(const string& v) { 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); }