mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
UCI buttons don't need a value
Take advantage of this to further simplify the code. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
10
src/uci.cpp
10
src/uci.cpp
@@ -175,14 +175,10 @@ namespace {
|
||||
while (is >> token)
|
||||
value += string(" ", !value.empty()) + token;
|
||||
|
||||
if (!Options.count(name))
|
||||
cout << "No such option: " << name << endl;
|
||||
|
||||
else if (value.empty()) // UCI buttons don't have a value
|
||||
Options[name] = true;
|
||||
|
||||
else
|
||||
if (Options.count(name))
|
||||
Options[name] = value;
|
||||
else
|
||||
cout << "No such option: " << name << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user