mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 17:19:36 +00:00
Reduce indentation in UCIOption::operator=()
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
628808a113
commit
ebe8009aff
1 changed files with 9 additions and 9 deletions
|
@ -138,14 +138,14 @@ void UCIOption::operator=(const string& v) {
|
||||||
|
|
||||||
assert(!type.empty());
|
assert(!type.empty());
|
||||||
|
|
||||||
if ( (type == "button" || !v.empty())
|
if ( (type != "button" && v.empty())
|
||||||
&& (type != "check" || (v == "true" || v == "false"))
|
|| (type == "check" && v != "true" && v != "false")
|
||||||
&& (type != "spin" || (atoi(v.c_str()) >= min && atoi(v.c_str()) <= max)))
|
|| (type == "spin" && (atoi(v.c_str()) < min || atoi(v.c_str()) > max)))
|
||||||
{
|
return;
|
||||||
|
|
||||||
if (type != "button")
|
if (type != "button")
|
||||||
currentValue = v;
|
currentValue = v;
|
||||||
|
|
||||||
if (on_change)
|
if (on_change)
|
||||||
(*on_change)(*this);
|
(*on_change)(*this);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue