summaryrefslogtreecommitdiff
path: root/src/render.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-03-27 22:05:00 (GMT)
committerMarius Kintel <marius@kintel.net>2012-03-27 22:05:58 (GMT)
commit327310f190bbd81c7b71b568d5bf72bb900cc9db (patch)
tree9399bb490ecafe9f0c7fd209c680311d829eb631 /src/render.cc
parent4394c7a030ce7a08c95bd1af2e8c38ffcf972439 (diff)
Rewrote the Value class to be based on boost::variant - this should reduce memory footprint and improve performance
Diffstat (limited to 'src/render.cc')
-rw-r--r--src/render.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render.cc b/src/render.cc
index 7b0ced5..81c3f7b 100644
--- a/src/render.cc
+++ b/src/render.cc
@@ -53,8 +53,8 @@ AbstractNode *RenderModule::evaluate(const Context *ctx, const ModuleInstantiati
c.args(argnames, argexpr, inst->argnames, inst->argvalues);
Value v = c.lookup_variable("convexity");
- if (v.type == Value::NUMBER)
- node->convexity = (int)v.num;
+ if (v.type() == Value::NUMBER)
+ node->convexity = (int)v.toDouble();
std::vector<AbstractNode *> evaluatednodes = inst->evaluateChildren();
node->children.insert(node->children.end(), evaluatednodes.begin(), evaluatednodes.end());
contact: Jan Huwald // Impressum