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/variable.ixx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'build/variable.ixx') diff --git a/build/variable.ixx b/build/variable.ixx index 85fdd50..ca5a24a 100644 --- a/build/variable.ixx +++ b/build/variable.ixx @@ -7,7 +7,6 @@ namespace build inline const value_proxy& value_proxy:: operator= (value_ptr v) const { - assert (v == nullptr || &v->scope == s); *p = std::move (v); return *this; } @@ -18,7 +17,7 @@ namespace build if (this != &v) { if (v) - *p = v.as ().clone (*s); + *p = v.as ().clone (); else p->reset (); } @@ -33,14 +32,14 @@ namespace build // don't bother trying to optimize for the case where p is not // NULL. // - p->reset (new list_value (*s, std::move (v))); + p->reset (new list_value (std::move (v))); return *this; } inline const value_proxy& value_proxy:: operator= (path v) const { - p->reset (new list_value (*s, std::move (v))); + p->reset (new list_value (std::move (v))); return *this; } } -- cgit v1.1