diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-12-03 13:47:42 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-12-03 16:48:07 +0200 |
commit | b259a318223370881d5244cc38ff8a7be58e2a3e (patch) | |
tree | a65909217d5d91e31ebe891c0278546cb58ea36d /libbuild2/algorithm.hxx | |
parent | 68a27c5bca208337f5749fe1959ac21c062b77fb (diff) |
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.
Diffstat (limited to 'libbuild2/algorithm.hxx')
-rw-r--r-- | libbuild2/algorithm.hxx | 10 |
1 files changed, 4 insertions, 6 deletions
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&); |