diff options
author | Marius Kintel <marius@kintel.net> | 2013-04-18 22:34:14 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-04-18 22:34:14 (GMT) |
commit | 58bd9c9e3f4454d055bf51d63463a9965a9dcbd7 (patch) | |
tree | 732cd423858685365a4115d44a52f85ae90866a1 /src/surface.cc | |
parent | 73c2a45af6afca253159d2cf9c1ecf5747f0217e (diff) |
Cleaned up argument list handling, related to #116
Diffstat (limited to 'src/surface.cc')
-rw-r--r-- | src/surface.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/surface.cc b/src/surface.cc index 22da93d..d8fa422 100644 --- a/src/surface.cc +++ b/src/surface.cc @@ -75,12 +75,11 @@ AbstractNode *SurfaceModule::evaluate(const Context *ctx, const ModuleInstantiat node->center = false; node->convexity = 1; - std::vector<std::string> argnames; - argnames += "file", "center", "convexity"; - std::vector<Expression*> argexpr; + AssignmentList args; + args += Assignment("file", NULL), Assignment("center", NULL), Assignment("convexity", NULL); Context c(ctx); - c.setVariables(argnames, argexpr, evalctx); + c.setVariables(args, evalctx); Value fileval = c.lookup_variable("file"); node->filename = inst->getAbsolutePath(fileval.isUndefined() ? "" : fileval.toString()); |