aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/common.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-02-01 16:36:24 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:42:41 +0200
commite3e597180487328a54721e2afb95e33ed853d586 (patch)
tree89d59f482d41eb37a90f97b0dd55c2e878e4800b /build2/cc/common.cxx
parent1dd17210b76d544a04fc6b4f3c98162ae9718102 (diff)
Pass const scope& where modification should not happen
Diffstat (limited to 'build2/cc/common.cxx')
-rw-r--r--build2/cc/common.cxx10
1 files changed, 5 insertions, 5 deletions
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<lorder> 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<process_path> (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;