mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Simplify set_option()
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -163,8 +163,11 @@ void Option::set_value(const string& value) {
|
||||
|
||||
assert(!type.empty());
|
||||
|
||||
if ( (type == "check" || type == "button")
|
||||
&& !(value == "true" || value == "false"))
|
||||
if (value.empty())
|
||||
return;
|
||||
|
||||
if ( (type == "check" || type == "button")
|
||||
!= (value == "true" || value == "false"))
|
||||
return;
|
||||
|
||||
if (type == "spin")
|
||||
|
||||
Reference in New Issue
Block a user