summaryrefslogtreecommitdiff
path: root/src/control.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-09-08 06:52:21 (GMT)
committerMarius Kintel <marius@kintel.net>2011-09-08 06:52:21 (GMT)
commit6659ad47b0b07b66b62ca79f3929d361733cc67a (patch)
treee4f0cbd7fa1e4b5dcb69daca43d3a7f33a1ed022 /src/control.cc
parent5ce3d4ff8df274bbbb1b5dbd272179ad5765ded1 (diff)
Updated boolean handling of if/else
Diffstat (limited to 'src/control.cc')
-rw-r--r--src/control.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/control.cc b/src/control.cc
index c39b74a..492b909 100644
--- a/src/control.cc
+++ b/src/control.cc
@@ -149,7 +149,7 @@ AbstractNode *ControlModule::evaluate(const Context*, const ModuleInstantiation
if (type == IF)
{
const IfElseModuleInstantiation *ifelse = dynamic_cast<const IfElseModuleInstantiation*>(inst);
- if (ifelse->argvalues.size() > 0 && ifelse->argvalues[0].type == Value::BOOL && ifelse->argvalues[0].b) {
+ if (ifelse->argvalues.size() > 0 && ifelse->argvalues[0].toBool()) {
std::vector<AbstractNode *> evaluatednodes = ifelse->evaluateChildren();
node->children.insert(node->children.end(), evaluatednodes.begin(), evaluatednodes.end());
}
contact: Jan Huwald // Impressum