aboutsummaryrefslogtreecommitdiff
path: root/build2/search.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-02-02 11:55:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:42:41 +0200
commitd263455d5ac0d87541144dd7a37eb6255b721a89 (patch)
tree97b56b4f817c61de5fa543cfa6d94bab5f05c5c0 /build2/search.cxx
parent53f02bf28dae507a51515ed6ac03226d68816494 (diff)
Redesign target_set interface in preparation for locking
Diffstat (limited to 'build2/search.cxx')
-rw-r--r--build2/search.cxx12
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*