aboutsummaryrefslogtreecommitdiff
path: root/build/rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-30 15:07:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-30 15:07:03 +0200
commit70af0087d8efb3f2f7dc9ffdf2568419913f16da (patch)
treedceeab7a3c600add8bf3f3375a2d83ca11213624 /build/rule.cxx
parent18568ff0ff3dce89d694b494c5dfc9a32e63c9e6 (diff)
Group "see through" iteration, take 1
Diffstat (limited to 'build/rule.cxx')
-rw-r--r--build/rule.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/build/rule.cxx b/build/rule.cxx
index 34aae9d..e834426 100644
--- a/build/rule.cxx
+++ b/build/rule.cxx
@@ -30,7 +30,7 @@ namespace build
// that normal implementations should follow. So you probably shouldn't
// use it as a guide to implement your own, normal, rules.
//
- void* path_rule::
+ match_result path_rule::
match (action a, target& t, const string&) const
{
// While strictly speaking we should check for the file's existence
@@ -60,12 +60,12 @@ namespace build
return pt.mtime () != timestamp_nonexistent ? &t : nullptr;
}
default:
- return &t;
+ return t;
}
}
recipe path_rule::
- apply (action a, target& t, void*) const
+ apply (action a, target& t, const match_result&) const
{
// Update triggers the update of this target's prerequisites
// so it would seem natural that we should also trigger their
@@ -125,14 +125,14 @@ namespace build
// dir_rule
//
- void* dir_rule::
+ match_result dir_rule::
match (action a, target& t, const string&) const
{
- return &t;
+ return t;
}
recipe dir_rule::
- apply (action a, target& t, void*) const
+ apply (action a, target& t, const match_result&) const
{
// When cleaning, ignore prerequisites that are not in the same
// or a subdirectory of ours. For default, we don't do anything
@@ -151,14 +151,14 @@ namespace build
// fsdir_rule
//
- void* fsdir_rule::
+ match_result fsdir_rule::
match (action a, target& t, const string&) const
{
- return &t;
+ return t;
}
recipe fsdir_rule::
- apply (action a, target& t, void*) const
+ apply (action a, target& t, const match_result&) const
{
switch (a.operation ())
{