mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-23 18:46:59 +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:
@@ -39,10 +39,9 @@ public:
|
||||
UCIOption(int v, int min, int max, Fn* = NULL);
|
||||
|
||||
void operator=(const std::string& v);
|
||||
void operator=(bool v) { *this = std::string(v ? "true" : "false"); }
|
||||
|
||||
operator int() const {
|
||||
assert(type == "check" || type == "button" || type == "spin");
|
||||
assert(type == "check" || type == "spin");
|
||||
return (type == "spin" ? atoi(currentValue.c_str()) : currentValue == "true");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user