From 19af3f6b0873a92582e4787a87a6f14df53ff6ae Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 10 Oct 2022 18:22:31 +0200 Subject: Preparatory work for public/private variable distinction We still always use the public var_pool from context but where required, all access now goes through scope::var_pool(). --- libbuild2/build/script/parser.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libbuild2/build/script/parser.cxx') diff --git a/libbuild2/build/script/parser.cxx b/libbuild2/build/script/parser.cxx index 788a782..bcea7e0 100644 --- a/libbuild2/build/script/parser.cxx +++ b/libbuild2/build/script/parser.cxx @@ -2526,10 +2526,8 @@ namespace build2 { if (pre_parse_suspended_) { - const variable* pvar (scope_->ctx.var_pool.find (name)); - - if (pvar != nullptr) - r = (*scope_)[*pvar]; + if (const variable* var = scope_->var_pool ().find (name)) + r = (*scope_)[*var]; } if (!depdb_clear_) -- cgit v1.1