diff options
author | Brad Pitcher <bradpitcher@gmail.com> | 2011-10-26 02:22:14 (GMT) |
---|---|---|
committer | Brad Pitcher <bradpitcher@gmail.com> | 2011-10-26 02:22:14 (GMT) |
commit | ea7e4988d44249946b620d5973b230cf1a0606ca (patch) | |
tree | 2e3a5c03b78479298c64510356c7b10b9598ea71 /src/expr.cc | |
parent | b64de29a302fa09f4e9409f57d344c602566e442 (diff) | |
parent | ff6d6cda13040e69ef15bb8989ca0f436a8020cc (diff) |
Merge branch 'master' of https://github.com/openscad/openscad into win32
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); |