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/algorithm.hxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'libbuild2/algorithm.hxx') diff --git a/libbuild2/algorithm.hxx b/libbuild2/algorithm.hxx index a0f8cd6..456862d 100644 --- a/libbuild2/algorithm.hxx +++ b/libbuild2/algorithm.hxx @@ -79,7 +79,7 @@ namespace build2 search_locked (const target&, const target_type&, const prerequisite_key&); const target* - search_exsiting (context&, const target_type&, const prerequisite_key&); + search_existing (context&, const target_type&, const prerequisite_key&); const target& search_new (context&, const target_type&, const prerequisite_key&); @@ -166,13 +166,11 @@ namespace build2 LIBBUILD2_SYMEXPORT const target& search (const target&, name&&, const scope&, const target_type* = nullptr); - // Note: returns NULL for unknown target types. Note that unlike the above - // version, these ones can be called during the load and execute phases. + // Note: returns NULL for unknown target types. Note also that unlike the + // above version, these can be called during the load and execute phases. // LIBBUILD2_SYMEXPORT const target* - search_existing (const name&, - const scope&, - const dir_path& out = dir_path ()); + search_existing (const name&, const scope&, const dir_path& out = dir_path ()); LIBBUILD2_SYMEXPORT const target* search_existing (const names&, const scope&); -- cgit v1.1