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/algorithm.ixx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'build2/algorithm.ixx') 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& ext, - scope* scope, + const scope* scope, const optional& proj) { return search ( @@ -46,7 +46,7 @@ namespace build2 const dir_path& out, const string& name, const optional& ext, - scope* scope) + const scope* scope) { return static_cast ( 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); } -- cgit v1.1