diff options
author | Marius Kintel <marius@kintel.net> | 2011-10-24 11:47:09 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-10-24 11:47:09 (GMT) |
commit | 8aa762d4d5da7e267094cfc35589c2d7f179bb63 (patch) | |
tree | c7811cd445ee9df048c80311ba9f006c206c16e1 /src/expr.cc | |
parent | 82ff5a12ec876c80a626357557fa8afdbf0721cc (diff) | |
parent | ff6d6cda13040e69ef15bb8989ca0f436a8020cc (diff) |
Merge branch 'master' into visitortests
Diffstat (limited to 'src/expr.cc')
-rw-r--r-- | src/expr.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/expr.cc b/src/expr.cc index c9eda4e..fc1fbf0 100644 --- a/src/expr.cc +++ b/src/expr.cc @@ -75,9 +75,7 @@ Value Expression::evaluate(const Context *context) const return this->children[0]->evaluate(context) > this->children[1]->evaluate(context); if (this->type == "?:") { Value v = this->children[0]->evaluate(context); - if (v.type == Value::BOOL) - return this->children[v.b ? 1 : 2]->evaluate(context); - return Value(); + return this->children[v.toBool() ? 1 : 2]->evaluate(context); } if (this->type == "[]") { Value v1 = this->children[0]->evaluate(context); |