diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-07-01 09:48:25 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-07-01 09:48:25 (GMT) |
commit | 82fad98cb63d6e27e7c156d4c5e4c9a9847abfd1 (patch) | |
tree | d70ff76ec4f5138706df5cb11fd034e60d927f4d /context.cc | |
parent | 27ecd0b1d0bf0114b465beeb4db482f0f1f87c52 (diff) |
Clifford Wolf:
Yet another redesign of the evaluation path
git-svn-id: http://svn.clifford.at/openscad/trunk@44 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'context.cc')
-rw-r--r-- | context.cc | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -87,15 +87,13 @@ Value Context::evaluate_function(QString name, const QVector<QString> &argnames, return Value(); } -AbstractNode *Context::evaluate_module(QString name, const QVector<QString> &argnames, const QVector<Value> &argvalues, const QVector<ModuleInstanciation*> arg_children, const Context *arg_context) const +AbstractNode *Context::evaluate_module(const ModuleInstanciation *inst) const { - if (arg_context == NULL) - arg_context = this; - if (modules_p && modules_p->contains(name)) - return modules_p->value(name)->evaluate(this, argnames, argvalues, arg_children, arg_context); + if (modules_p && modules_p->contains(inst->modname)) + return modules_p->value(inst->modname)->evaluate(this, inst); if (parent) - return parent->evaluate_module(name, argnames, argvalues, arg_children, arg_context); - PRINTA("WARNING: Ignoring unkown module '%1'.", name); + return parent->evaluate_module(inst); + PRINTA("WARNING: Ignoring unkown module '%1'.", inst->modname); return NULL; } |