Simplify set_option()

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-01-09 14:45:49 +01:00
parent 06c14d0a37
commit a8741bd59f
2 changed files with 20 additions and 30 deletions

View File

@@ -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")