summaryrefslogtreecommitdiff
path: root/src/primitives.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-09-02 00:32:07 (GMT)
committerMarius Kintel <marius@kintel.net>2011-09-02 00:32:07 (GMT)
commitc555a9646a68e823c8261e905fc4c3a11855c5c6 (patch)
tree42aee8c371ea0c665ecc6f43b9d1f4d2a24b1119 /src/primitives.cc
parentc48d12a3524d5de99fb60e00dba23213c35642bb (diff)
change: Always use r as fallback variable if either of r1 or r2 are missing
Diffstat (limited to 'src/primitives.cc')
-rw-r--r--src/primitives.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/primitives.cc b/src/primitives.cc
index 5502192..0da8fba 100644
--- a/src/primitives.cc
+++ b/src/primitives.cc
@@ -180,8 +180,7 @@ AbstractNode *PrimitiveModule::evaluate(const Context *ctx, const ModuleInstanti
Value r, r1, r2;
r1 = c.lookup_variable("r1");
r2 = c.lookup_variable("r2");
- if (r1.type != Value::NUMBER && r2.type != Value::NUMBER)
- r = c.lookup_variable("r", true); // silence warning since r has no default value
+ r = c.lookup_variable("r", true); // silence warning since r has no default value
Value center = c.lookup_variable("center");
if (h.type == Value::NUMBER) {
node->h = h.num;
contact: Jan Huwald // Impressum