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/cc/common.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'build2/cc/common.cxx') diff --git a/build2/cc/common.cxx b/build2/cc/common.cxx index aa0a45b..e7b26a1 100644 --- a/build2/cc/common.cxx +++ b/build2/cc/common.cxx @@ -46,7 +46,7 @@ namespace build2 // void common:: process_libraries ( - scope& top_bs, + const scope& top_bs, lorder top_lo, const dir_paths& top_sysd, file& l, @@ -183,7 +183,7 @@ namespace build2 proc_lib (&l, p, s); } - scope& bs (t == nullptr || cc ? top_bs : l.base_scope ()); + const scope& bs (t == nullptr || cc ? top_bs : l.base_scope ()); optional lo; // Calculate lazily. const dir_paths* sysd (nullptr); // Resolve lazily. @@ -386,7 +386,7 @@ namespace build2 // that's the only way to guarantee it will be up-to-date. // file& common:: - resolve_library (scope& s, + resolve_library (const scope& s, name n, lorder lo, const dir_paths& sysd, @@ -657,7 +657,7 @@ namespace build2 // if (cid == "msvc") { - scope& rs (*p.scope->root_scope ()); + const scope& rs (*p.scope->root_scope ()); const process_path& ld (cast (rs["bin.ld.path"])); if (s == nullptr && !sn.empty ()) @@ -821,7 +821,7 @@ namespace build2 } dir_paths common:: - extract_library_dirs (scope& bs) const + extract_library_dirs (const scope& bs) const { dir_paths r; -- cgit v1.1