From 29c3e3b8912b784d9e2e4a4bec4c2378c7ffef7a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 8 Apr 2015 11:29:43 +0200 Subject: Get rid of need to store scope in variable value --- build/parser.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'build/parser.cxx') 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 ()); - 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)); } } -- cgit v1.1