From 70af0087d8efb3f2f7dc9ffdf2568419913f16da Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 30 Jun 2015 15:07:03 +0200 Subject: Group "see through" iteration, take 1 --- build/bin/rule | 8 ++++---- build/bin/rule.cxx | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'build/bin') diff --git a/build/bin/rule b/build/bin/rule index b8b9873..743b1ca 100644 --- a/build/bin/rule +++ b/build/bin/rule @@ -14,21 +14,21 @@ namespace build class obj_rule: public rule { public: - virtual void* + virtual match_result match (action, target&, const std::string& hint) const; virtual recipe - apply (action, target&, void*) const; + apply (action, target&, const match_result&) const; }; class lib_rule: public rule { public: - virtual void* + virtual match_result match (action, target&, const std::string& hint) const; virtual recipe - apply (action, target&, void*) const; + apply (action, target&, const match_result&) const; static target_state perform (action, target&); diff --git a/build/bin/rule.cxx b/build/bin/rule.cxx index 1834f7a..d2928ca 100644 --- a/build/bin/rule.cxx +++ b/build/bin/rule.cxx @@ -19,7 +19,7 @@ namespace build { // obj // - void* obj_rule:: + match_result obj_rule:: match (action a, target& t, const std::string&) const { fail << diag_doing (a, t) << " target group" << @@ -29,21 +29,21 @@ namespace build } recipe obj_rule:: - apply (action, target&, void*) const {return empty_recipe;} + apply (action, target&, const match_result&) const {return empty_recipe;} // lib // // The whole logic is pretty much as if we had our two group // members as prerequisites. // - void* lib_rule:: + match_result lib_rule:: match (action, target& t, const std::string&) const { - return &t; + return t; } recipe lib_rule:: - apply (action a, target& xt, void*) const + apply (action a, target& xt, const match_result&) const { lib& t (static_cast (xt)); -- cgit v1.1