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/dist/operation.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build2/dist') 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 (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; -- cgit v1.1