From e65c406301c3a7b30174f8706ba39584e80ddf25 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 2 Aug 2017 11:18:38 +0200 Subject: Save module map to pkg-config files --- build2/target.hxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'build2/target.hxx') diff --git a/build2/target.hxx b/build2/target.hxx index 3af533f..94fb800 100644 --- a/build2/target.hxx +++ b/build2/target.hxx @@ -640,8 +640,9 @@ namespace build2 // Target type info and casting. // public: - bool - is_a (const target_type& tt) const {return type ().is_a (tt);} + const target* + is_a (const target_type& tt) const { + return type ().is_a (tt) ? this : nullptr;} template T* @@ -871,7 +872,9 @@ namespace build2 bool is_a (const target_type_type& tt) const { - return target != nullptr ? target->is_a (tt) : prerequisite.is_a (tt); + return target != nullptr + ? target->is_a (tt) != nullptr + : prerequisite.is_a (tt); } prerequisite_key -- cgit v1.1