From e3e597180487328a54721e2afb95e33ed853d586 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 1 Feb 2017 16:36:24 +0200 Subject: Pass const scope& where modification should not happen --- build2/scope.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'build2/scope.cxx') diff --git a/build2/scope.cxx b/build2/scope.cxx index 9514817..0c80052 100644 --- a/build2/scope.cxx +++ b/build2/scope.cxx @@ -691,10 +691,15 @@ namespace build2 pr.first->second.get (), pr.second); } + scope* scope::global_; + // scope_map // - scope_map scopes; - scope* global_scope; + scope_map scope_map::instance; + const scope_map& scope_map::cinstance = scope_map::instance; + const scope_map& scopes = scope_map::cinstance; + + const scope* global_scope; auto scope_map:: insert (const dir_path& k, bool root) -> iterator -- cgit v1.1