From 3954be70024fd60c20c658f08025eff7654a8943 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 5 Feb 2018 12:10:55 +0200 Subject: Rename prerequisite_member::target to prerequisite_member::member --- build2/install/rule.cxx | 4 ++-- build2/target.hxx | 36 ++++++++++++++++++------------------ build2/target.ixx | 6 +++--- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/build2/install/rule.cxx b/build2/install/rule.cxx index 2b5d048..8bf58aa 100644 --- a/build2/install/rule.cxx +++ b/build2/install/rule.cxx @@ -55,7 +55,7 @@ namespace build2 const target* alias_rule:: filter (action a, const target& t, prerequisite_iterator& i) const { - assert (i->target == nullptr); + assert (i->member == nullptr); return filter (a, t, i->prerequisite); } @@ -218,7 +218,7 @@ namespace build2 const target* file_rule:: filter (action a, const target& t, prerequisite_iterator& i) const { - assert (i->target == nullptr); + assert (i->member == nullptr); return filter (a, t, i->prerequisite); } diff --git a/build2/target.hxx b/build2/target.hxx index 5c8e7bd..405bf4f 100644 --- a/build2/target.hxx +++ b/build2/target.hxx @@ -808,7 +808,7 @@ namespace build2 const target* g_; }; - // A member of a prerequisite. If 'target' is NULL, then this is the + // A member of a prerequisite. If 'member' is NULL, then this is the // prerequisite itself. Otherwise, it is its member. In this case // 'prerequisite' still refers to the prerequisite. // @@ -820,57 +820,57 @@ namespace build2 using target_type_type = build2::target_type; const prerequisite_type& prerequisite; - const target_type* target; + const target_type* member; template bool is_a () const { - return target != nullptr - ? target->is_a () != nullptr + return member != nullptr + ? member->is_a () != nullptr : prerequisite.is_a (); } bool is_a (const target_type_type& tt) const { - return target != nullptr - ? target->is_a (tt) != nullptr + return member != nullptr + ? member->is_a (tt) != nullptr : prerequisite.is_a (tt); } prerequisite_key key () const { - return target != nullptr - ? prerequisite_key {prerequisite.proj, target->key (), nullptr} + return member != nullptr + ? prerequisite_key {prerequisite.proj, member->key (), nullptr} : prerequisite.key (); } const target_type_type& type () const { - return target != nullptr ? target->type () : prerequisite.type; + return member != nullptr ? member->type () : prerequisite.type; } const string& name () const { - return target != nullptr ? target->name : prerequisite.name; + return member != nullptr ? member->name : prerequisite.name; } const dir_path& dir () const { - return target != nullptr ? target->dir : prerequisite.dir; + return member != nullptr ? member->dir : prerequisite.dir; } const optional& proj () const { - // Target cannot be project-qualified. + // Member cannot be project-qualified. // - return target != nullptr + return member != nullptr ? prerequisite_key::nullproj : prerequisite.proj; } @@ -878,27 +878,27 @@ namespace build2 const scope_type& scope () const { - return target != nullptr ? target->base_scope () : prerequisite.scope; + return member != nullptr ? member->base_scope () : prerequisite.scope; } const target_type& search (const target_type& t) const { - return target != nullptr ? *target : build2::search (t, prerequisite); + return member != nullptr ? *member : build2::search (t, prerequisite); } const target_type* search_existing () const { - return target != nullptr - ? target + return member != nullptr + ? member : build2::search_existing (prerequisite); } const target_type* load (memory_order mo = memory_order_consume) { - return target != nullptr ? target : prerequisite.target.load (mo); + return member != nullptr ? member : prerequisite.target.load (mo); } // Return as a new prerequisite instance. diff --git a/build2/target.ixx b/build2/target.ixx index 242e81d..cf1eec9 100644 --- a/build2/target.ixx +++ b/build2/target.ixx @@ -187,15 +187,15 @@ namespace build2 inline prerequisite prerequisite_member:: as_prerequisite () const { - if (target == nullptr) + if (member == nullptr) return prerequisite; // An ad hoc group member cannot be used as a prerequisite (use the whole // group instead). // - assert (!target->adhoc_member ()); + assert (!member->adhoc_member ()); - return prerequisite_type (*target); + return prerequisite_type (*member); } // prerequisite_members -- cgit v1.1