From b259a318223370881d5244cc38ff8a7be58e2a3e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 3 Dec 2023 13:47:42 +0200 Subject: Reimplement search_existing() functions via target_type::search This allows us to automatically get the target type-specific behavior with regards to the out_only semantics (added in the previous commit) instead of passing it explicitly from each call site. --- libbuild2/dist/rule.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libbuild2/dist') diff --git a/libbuild2/dist/rule.cxx b/libbuild2/dist/rule.cxx index 320d17a..c63f7f3 100644 --- a/libbuild2/dist/rule.cxx +++ b/libbuild2/dist/rule.cxx @@ -87,7 +87,7 @@ namespace build2 // Note: see also similar code in match_postponed() below. // const prerequisite_key& k (p.key ()); - pt = k.tk.type->search (t, k); + pt = k.tk.type->search (t.ctx, &t, k); if (pt == nullptr) { @@ -134,7 +134,7 @@ namespace build2 const prerequisite& p (pp.prereq); const prerequisite_key& k (p.key ()); - const target* pt (k.tk.type->search (t, k)); + const target* pt (k.tk.type->search (t.ctx, &t, k)); if (pt == nullptr) { -- cgit v1.1