diff options
Diffstat (limited to 'build2/search.cxx')
-rw-r--r-- | build2/search.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/build2/search.cxx b/build2/search.cxx index 65eb2fd..8f621c2 100644 --- a/build2/search.cxx +++ b/build2/search.cxx @@ -71,15 +71,13 @@ namespace build2 o.clear (); } - auto i (targets.find (*tk.type, d, o, *tk.name, tk.ext, trace)); + target* t (targets.find (*tk.type, d, o, *tk.name, tk.ext, trace)); - if (i == targets.end ()) - return 0; + if (t != nullptr) + l5 ([&]{trace << "existing target " << t + << " for prerequisite " << pk;}); - target& t (**i); - - l5 ([&]{trace << "existing target " << t << " for prerequisite " << pk;}); - return &t; + return t; } target* |