diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-08-02 11:18:38 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-08-02 11:33:51 +0200 |
commit | e65c406301c3a7b30174f8706ba39584e80ddf25 (patch) | |
tree | 39ab598476f4965616979f498e016e3f7913008c /build2/target.hxx | |
parent | e8ef2fbd339afd8113bd92d371bc49d7d570c32f (diff) |
Save module map to pkg-config files
Diffstat (limited to 'build2/target.hxx')
-rw-r--r-- | build2/target.hxx | 9 |
1 files changed, 6 insertions, 3 deletions
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 <typename T> 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 |