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:
Marco Costalba
2012-03-17 21:18:02 +01:00
parent 9b26356347
commit 55376219b7
3 changed files with 10 additions and 17 deletions

View File

@@ -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;
}