diff options
author | Brad Pitcher <bradpitcher@gmail.com> | 2011-11-01 17:15:35 (GMT) |
---|---|---|
committer | Brad Pitcher <bradpitcher@gmail.com> | 2011-11-01 17:15:35 (GMT) |
commit | e2caf3726d68ff1fef63113519049abffc0563af (patch) | |
tree | 6558c6f03ccc21e7138d23861f80e8d97b09e60e /src/expr.cc | |
parent | 7541854212d6c1223e015faf55a6ca0657a1c184 (diff) | |
parent | cb56f700b1b0f4ae589da62a5fd1d4e368deb604 (diff) |
merge master
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); |