diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-08 11:29:43 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-08 11:29:43 +0200 |
commit | 29c3e3b8912b784d9e2e4a4bec4c2378c7ffef7a (patch) | |
tree | 3465bcb6fd73dbedfcc42ecdd94e71e701a2a1e8 /build/parser.cxx | |
parent | 9e6303e86dae25096ee62d74abfca4456be6a96f (diff) |
Get rid of need to store scope in variable value
Diffstat (limited to 'build/parser.cxx')
-rw-r--r-- | build/parser.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/build/parser.cxx b/build/parser.cxx index 2845143..24a1e98 100644 --- a/build/parser.cxx +++ b/build/parser.cxx @@ -700,7 +700,7 @@ namespace build if (val == nullptr) // Initialization. { - val.reset (new list_value (*scope_, move (vns))); + val.reset (new list_value (move (vns))); } else // Assignment. { @@ -717,9 +717,9 @@ namespace build // list_value* lv (&val.as<list_value&> ()); - if (&lv->scope != scope_) // Append to value from parent scope? + if (val.scope != scope_) // Append to value from parent scope? { - list_value_ptr nval (new list_value (*scope_, lv->data)); + list_value_ptr nval (new list_value (lv->data)); lv = nval.get (); // Append to. scope_->variables.emplace (var, move (nval)); } @@ -730,7 +730,7 @@ namespace build } else // Initialization. { - list_value_ptr nval (new list_value (*scope_, move (vns))); + list_value_ptr nval (new list_value (move (vns))); scope_->variables.emplace (var, move (nval)); } } |