From 51ae6dcf64ce1de3f0f28228050c7db1776e5b1b Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 19 May 2020 19:57:46 +0300 Subject: Remove redundant script member from build::script::environment class --- libbuild2/build/script/parser.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libbuild2/build/script/parser.cxx') diff --git a/libbuild2/build/script/parser.cxx b/libbuild2/build/script/parser.cxx index c64bcd9..9c397f1 100644 --- a/libbuild2/build/script/parser.cxx +++ b/libbuild2/build/script/parser.cxx @@ -240,7 +240,7 @@ namespace build2 // void parser:: - execute (environment& e, runner& r) + execute (const script& s, environment& e, runner& r) { path_ = nullptr; // Set by replays. @@ -248,7 +248,7 @@ namespace build2 set_lexer (nullptr); - script_ = nullptr; + script_ = const_cast (&s); runner_ = &r; environment_ = &e; @@ -258,7 +258,7 @@ namespace build2 void parser:: exec_script () { - const script& s (environment_->script); + const script& s (*script_); runner_->enter (*environment_, s.start_loc); -- cgit v1.1