aboutsummaryrefslogtreecommitdiff
path: root/build2/algorithm.ixx
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/algorithm.ixx
parent1dd17210b76d544a04fc6b4f3c98162ae9718102 (diff)
Pass const scope& where modification should not happen
Diffstat (limited to 'build2/algorithm.ixx')
-rw-r--r--build2/algorithm.ixx19
1 files changed, 12 insertions, 7 deletions
diff --git a/build2/algorithm.ixx b/build2/algorithm.ixx
index ec06ddf..365a5c4 100644
--- a/build2/algorithm.ixx
+++ b/build2/algorithm.ixx
@@ -33,7 +33,7 @@ namespace build2
const dir_path& out,
const string& name,
const optional<string>& ext,
- scope* scope,
+ const scope* scope,
const optional<string>& proj)
{
return search (
@@ -46,7 +46,7 @@ namespace build2
const dir_path& out,
const string& name,
const optional<string>& ext,
- scope* scope)
+ const scope* scope)
{
return static_cast<T&> (
search (T::static_type, dir, out, name, ext, scope));
@@ -118,10 +118,10 @@ namespace build2
}
void
- search_and_match_prerequisites (slock&, action, target&, scope*);
+ search_and_match_prerequisites (slock&, action, target&, const scope*);
void
- search_and_match_prerequisite_members (slock&, action, target&, scope*);
+ search_and_match_prerequisite_members (slock&, action, target&, const scope*);
inline void
search_and_match_prerequisites (slock& ml, action a, target& t)
@@ -147,14 +147,19 @@ namespace build2
}
inline void
- search_and_match_prerequisites (slock& ml, action a, target& t, scope& s)
+ search_and_match_prerequisites (slock& ml,
+ action a,
+ target& t,
+ const scope& s)
{
search_and_match_prerequisites (ml, a, t, &s);
}
inline void
- search_and_match_prerequisite_members (
- slock& ml, action a, target& t, scope& s)
+ search_and_match_prerequisite_members (slock& ml,
+ action a,
+ target& t,
+ const scope& s)
{
search_and_match_prerequisite_members (ml, a, t, &s);
}