From 7b9eb752cad04aaadc4552d0f26d307b04af1869 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 7 Feb 2017 08:09:53 +0200 Subject: Pass const target& to recipes --- build2/algorithm.ixx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'build2/algorithm.ixx') diff --git a/build2/algorithm.ixx b/build2/algorithm.ixx index cf234d8..0c171fd 100644 --- a/build2/algorithm.ixx +++ b/build2/algorithm.ixx @@ -173,7 +173,7 @@ namespace build2 } inline target_state - execute_delegate (const recipe& r, action a, target& t) + execute_delegate (const recipe& r, action a, const target& t) { return r (a, t); } @@ -181,13 +181,13 @@ namespace build2 // If the first argument is NULL, then the result is treated as a boolean // value. // - pair + pair execute_prerequisites (const target_type*, - action, target&, + action, const target&, const timestamp&, const prerequisite_filter&); inline pair - execute_prerequisites (action a, target& t, + execute_prerequisites (action a, const target& t, const timestamp& mt, const prerequisite_filter& pf) { auto p (execute_prerequisites (nullptr, a, t, mt, pf)); @@ -195,29 +195,29 @@ namespace build2 } template - inline pair - execute_prerequisites (action a, target& t, + inline pair + execute_prerequisites (action a, const target& t, const timestamp& mt, const prerequisite_filter& pf) { auto p (execute_prerequisites (T::static_type, a, t, mt, pf)); - return make_pair (static_cast (p.first), p.second); + return make_pair (static_cast (p.first), p.second); } - inline pair + inline pair execute_prerequisites (const target_type& tt, - action a, target& t, + action a, const target& t, const timestamp& mt, const prerequisite_filter& pf) { return execute_prerequisites (&tt, a, t, mt, pf); } template - inline pair + inline pair execute_prerequisites (const target_type& tt, - action a, target& t, + action a, const target& t, const timestamp& mt, const prerequisite_filter& pf) { auto p (execute_prerequisites (tt, a, t, mt, pf)); - return make_pair (static_cast (p.first), p.second); + return make_pair (static_cast (p.first), p.second); } } -- cgit v1.1