diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-07 08:09:53 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-13 12:42:42 +0200 |
commit | 7b9eb752cad04aaadc4552d0f26d307b04af1869 (patch) | |
tree | d19cdb450ddec384ec41d9129f8d4afecc14acb7 /build2/cli/rule.cxx | |
parent | be773edfa2c8f8f3230509bbd713542d20fbb37e (diff) |
Pass const target& to recipes
Diffstat (limited to 'build2/cli/rule.cxx')
-rw-r--r-- | build2/cli/rule.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/build2/cli/rule.cxx b/build2/cli/rule.cxx index 9f54950..5dcec99 100644 --- a/build2/cli/rule.cxx +++ b/build2/cli/rule.cxx @@ -199,7 +199,7 @@ namespace build2 } else { - cli_cxx& g (*static_cast<cli_cxx*> (xt.group)); + cli_cxx& g (static_cast<cli_cxx&> (*xt.group)); build2::match (ml, a, g); return group_recipe; // Execute the group's recipe. } @@ -228,16 +228,16 @@ namespace build2 } target_state compile:: - perform_update (action a, target& xt) + perform_update (action a, const target& xt) { - cli_cxx& t (static_cast<cli_cxx&> (xt)); + const cli_cxx& t (static_cast<const cli_cxx&> (xt)); // Update prerequisites and determine if any relevant ones render us // out-of-date. Note that currently we treat all the prerequisites // as potentially affecting the result (think prologues/epilogues, // etc). // - cli* s; + const cli* s; { auto p (execute_prerequisites<cli> (a, t, t.mtime ())); @@ -320,9 +320,9 @@ namespace build2 } target_state compile:: - perform_clean (action a, target& xt) + perform_clean (action a, const target& xt) { - cli_cxx& t (static_cast<cli_cxx&> (xt)); + const cli_cxx& t (static_cast<const cli_cxx&> (xt)); // The reverse order of update: first delete the files, then clean // prerequisites. Also update timestamp in case there are operations |