diff options
author | Marius Kintel <marius@kintel.net> | 2012-03-27 22:05:00 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-03-27 22:05:58 (GMT) |
commit | 327310f190bbd81c7b71b568d5bf72bb900cc9db (patch) | |
tree | 9399bb490ecafe9f0c7fd209c680311d829eb631 /src/projection.cc | |
parent | 4394c7a030ce7a08c95bd1af2e8c38ffcf972439 (diff) |
Rewrote the Value class to be based on boost::variant - this should reduce memory footprint and improve performance
Diffstat (limited to 'src/projection.cc')
-rw-r--r-- | src/projection.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/projection.cc b/src/projection.cc index d3e7e94..1fcf639 100644 --- a/src/projection.cc +++ b/src/projection.cc @@ -58,10 +58,10 @@ AbstractNode *ProjectionModule::evaluate(const Context *ctx, const ModuleInstant Value convexity = c.lookup_variable("convexity", true); Value cut = c.lookup_variable("cut", true); - node->convexity = (int)convexity.num; + node->convexity = (int)convexity.toDouble(); - if (cut.type == Value::BOOL) - node->cut_mode = cut.b; + if (cut.type() == Value::BOOL) + node->cut_mode = cut.toBool(); std::vector<AbstractNode *> evaluatednodes = inst->evaluateChildren(); node->children.insert(node->children.end(), evaluatednodes.begin(), evaluatednodes.end()); |