From 708b092956f10b5c05641f90d55b209e887d52de Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 22 Aug 2019 16:08:45 +0200 Subject: Run phase --- libbuild2/variable.hxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libbuild2/variable.hxx') diff --git a/libbuild2/variable.hxx b/libbuild2/variable.hxx index d153cb0..4befa51 100644 --- a/libbuild2/variable.hxx +++ b/libbuild2/variable.hxx @@ -1162,14 +1162,14 @@ namespace build2 void clear () {map_.clear ();} - variable_pool (): variable_pool (false) {} + variable_pool (): variable_pool (nullptr) {} - // RW access. + // RW access (only for the global pool). // variable_pool& rw () const { - assert (phase == run_phase::load); + assert (global_->phase == run_phase::load); return const_cast (*this); } @@ -1251,15 +1251,15 @@ namespace build2 private: std::multiset patterns_; - // Global pool flag. + // Global pool flag/context. // private: friend class context; explicit - variable_pool (bool global): global_ (global) {} + variable_pool (context* global): global_ (global) {} - bool global_; + context* global_; }; } -- cgit v1.1