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/cgaladv.cc | |
parent | 73c2a45af6afca253159d2cf9c1ecf5747f0217e (diff) |
Cleaned up argument list handling, related to #116
Diffstat (limited to 'src/cgaladv.cc')
-rw-r--r-- | src/cgaladv.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/cgaladv.cc b/src/cgaladv.cc index 8c98ae6..aad3a95 100644 --- a/src/cgaladv.cc +++ b/src/cgaladv.cc @@ -46,23 +46,22 @@ AbstractNode *CgaladvModule::evaluate(const Context *ctx, const ModuleInstantiat { CgaladvNode *node = new CgaladvNode(inst, type); - std::vector<std::string> argnames; - std::vector<Expression*> argexpr; + AssignmentList args; if (type == MINKOWSKI) - argnames += "convexity"; + args += Assignment("convexity", NULL); if (type == GLIDE) - argnames += "path", "convexity"; + args += Assignment("path", NULL), Assignment("convexity", NULL); if (type == SUBDIV) - argnames += "type", "level", "convexity"; + args += Assignment("type", NULL), Assignment("level", NULL), Assignment("convexity", NULL); if (type == RESIZE) - argnames += "newsize", "auto"; + args += Assignment("newsize", NULL), Assignment("auto", NULL); Context c(ctx); - c.setVariables(argnames, argexpr, evalctx); + c.setVariables(args, evalctx); Value convexity, path, subdiv_type, level; |