mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +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());
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue