aboutsummaryrefslogtreecommitdiff
path: root/build2/dist/operation.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/dist/operation.cxx
parent1dd17210b76d544a04fc6b4f3c98162ae9718102 (diff)
Pass const scope& where modification should not happen
Diffstat (limited to 'build2/dist/operation.cxx')
-rw-r--r--build2/dist/operation.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/build2/dist/operation.cxx b/build2/dist/operation.cxx
index c7fe83b..1f9fbbd 100644
--- a/build2/dist/operation.cxx
+++ b/build2/dist/operation.cxx
@@ -62,7 +62,7 @@ namespace build2
// For now we assume all the targets are from the same project.
//
target& t (*static_cast<target*> (ts[0]));
- scope* rs (t.base_scope ().root_scope ());
+ const scope* rs (t.base_scope ().root_scope ());
if (rs == nullptr)
fail << "out of project target " << t;
@@ -162,7 +162,7 @@ namespace build2
// ignored on the next step if the user explicitly marked them
// nodist.
//
- auto add_adhoc = [&trace] (scope& rs, const path& f)
+ auto add_adhoc = [&trace] (const scope& rs, const path& f)
{
path p (rs.src_path () / f);
if (exists (p))
@@ -194,7 +194,7 @@ namespace build2
{
const dir_path& pd (p.second);
dir_path out_nroot (out_root / pd);
- scope& nrs (scopes.find (out_nroot));
+ const scope& nrs (scopes.find (out_nroot));
if (nrs.out_path () != out_nroot) // This subproject not loaded.
continue;