diff options
author | Marius Kintel <marius@kintel.net> | 2013-04-19 17:56:27 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-04-26 21:43:40 (GMT) |
commit | b4568a09df8be0f212ba1c4fd1660459900e3cf0 (patch) | |
tree | bb8d909393a6c2e5bd7987f2e1dd13095507ff54 /src/builtin.cc | |
parent | 64ed1eb9fe00e287d84b18830df86cc0de6b122a (diff) |
Refactored assignments and assignments_var into one component
Diffstat (limited to 'src/builtin.cc')
-rw-r--r-- | src/builtin.cc | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/builtin.cc b/src/builtin.cc index bdd2d3b..37abde6 100644 --- a/src/builtin.cc +++ b/src/builtin.cc @@ -80,24 +80,18 @@ std::string Builtins::isDeprecated(const std::string &name) Builtins::Builtins() { - this->rootmodule.assignments_var.push_back("$fn"); - this->rootmodule.assignments["$fn"] = new Expression(Value(0.0)); - this->rootmodule.assignments_var.push_back("$fs"); - this->rootmodule.assignments["$fs"] = new Expression(Value(2.0)); - this->rootmodule.assignments_var.push_back("$fa"); - this->rootmodule.assignments["$fa"] = new Expression(Value(12.0)); - this->rootmodule.assignments_var.push_back("$t"); - this->rootmodule.assignments["$t"] = new Expression(Value(0.0)); + this->rootmodule.assignments.push_back(Assignment("$fn", new Expression(Value(0.0)))); + this->rootmodule.assignments.push_back(Assignment("$fs", new Expression(Value(2.0)))); + this->rootmodule.assignments.push_back(Assignment("$fa", new Expression(Value(12.0)))); + this->rootmodule.assignments.push_back(Assignment("$t", new Expression(Value(0.0)))); Value::VectorType zero3; zero3.push_back(Value(0.0)); zero3.push_back(Value(0.0)); zero3.push_back(Value(0.0)); Value zero3val(zero3); - this->rootmodule.assignments_var.push_back("$vpt"); - this->rootmodule.assignments["$vpt"] = new Expression(zero3val); - this->rootmodule.assignments_var.push_back("$vpr"); - this->rootmodule.assignments["$vpr"] = new Expression(zero3val); + this->rootmodule.assignments.push_back(Assignment("$vpt", new Expression(zero3val))); + this->rootmodule.assignments.push_back(Assignment("$vpr", new Expression(zero3val))); } Builtins::~Builtins() |