mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-25 19:22:07 +00:00
Remove the parent member of the diff node
* include/abg-comparison.h (diff::parent_): Remove. (diff::diff): Adjust. (diff::{get, set}_parent): Remove. * src/abg-comp-filter.cc (harmless_filter::visit): Remove category propagation to the parent. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
2f674216dc
commit
263fb9513c
@ -381,7 +381,6 @@ public:
|
||||
/// constructs are called the "subjects" of the diff.
|
||||
class diff : public diff_traversable_base
|
||||
{
|
||||
diff* parent_;
|
||||
decl_base_sptr first_subject_;
|
||||
decl_base_sptr second_subject_;
|
||||
diff_context_sptr ctxt_;
|
||||
@ -395,8 +394,7 @@ class diff : public diff_traversable_base
|
||||
protected:
|
||||
diff(decl_base_sptr first_subject,
|
||||
decl_base_sptr second_subject)
|
||||
: parent_(0),
|
||||
first_subject_(first_subject),
|
||||
: first_subject_(first_subject),
|
||||
second_subject_(second_subject),
|
||||
category_(NO_CHANGE_CATEGORY),
|
||||
reported_once_(false),
|
||||
@ -406,44 +404,16 @@ protected:
|
||||
diff(decl_base_sptr first_subject,
|
||||
decl_base_sptr second_subject,
|
||||
diff_context_sptr ctxt)
|
||||
: parent_(0),
|
||||
first_subject_(first_subject),
|
||||
second_subject_(second_subject),
|
||||
ctxt_(ctxt),
|
||||
category_(NO_CHANGE_CATEGORY),
|
||||
reported_once_(false),
|
||||
currently_reporting_(false)
|
||||
{}
|
||||
|
||||
diff(diff* parent,
|
||||
decl_base_sptr first_subject,
|
||||
decl_base_sptr second_subject,
|
||||
diff_context_sptr ctxt)
|
||||
: parent_(parent),
|
||||
first_subject_(first_subject),
|
||||
second_subject_(second_subject),
|
||||
ctxt_(ctxt),
|
||||
category_(NO_CHANGE_CATEGORY),
|
||||
reported_once_(false),
|
||||
currently_reporting_(false)
|
||||
: first_subject_(first_subject),
|
||||
second_subject_(second_subject),
|
||||
ctxt_(ctxt),
|
||||
category_(NO_CHANGE_CATEGORY),
|
||||
reported_once_(false),
|
||||
currently_reporting_(false)
|
||||
{}
|
||||
|
||||
public:
|
||||
|
||||
/// Getter of the parent diff node of this one.
|
||||
///
|
||||
/// Return the parent diff node if any, null otherwise.
|
||||
diff*
|
||||
get_parent() const
|
||||
{return parent_;}
|
||||
|
||||
/// Setter for the parent diff node of this one.
|
||||
///
|
||||
/// @param parent the parent diff node.
|
||||
void
|
||||
set_parent(diff* parent)
|
||||
{parent_ = parent;}
|
||||
|
||||
/// Getter of the first subject of the diff.
|
||||
///
|
||||
/// @return the first subject of the diff.
|
||||
|
@ -238,10 +238,6 @@ harmless_filter::visit(diff* d, bool pre)
|
||||
d->add_to_category(category);
|
||||
}
|
||||
|
||||
// Propagate the categorization to the parent nodes.
|
||||
if (d->get_parent())
|
||||
d->get_parent()->add_to_category(d->get_category());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -294,10 +290,6 @@ harmful_filter::visit(diff* d, bool pre)
|
||||
d->add_to_category(category);
|
||||
}
|
||||
|
||||
// Propagate the categorization to the parent nodes.
|
||||
if (d->get_parent())
|
||||
d->get_parent()->add_to_category(d->get_category());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user