1
0
Fork 0

Reduce indentation in UCIOption::operator=()

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
sf_2.3.1_base
Marco Costalba 2012-06-25 00:14:42 +01:00
parent 628808a113
commit ebe8009aff
1 changed files with 9 additions and 9 deletions

View File

@ -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 ( (type != "button" && v.empty())
|| (type == "check" && v != "true" && v != "false")
|| (type == "spin" && (atoi(v.c_str()) < min || atoi(v.c_str()) > max)))
return;
if (on_change)
(*on_change)(*this);
}
if (type != "button")
currentValue = v;
if (on_change)
(*on_change)(*this);
}