From 56db287aba095195c36ecdde182a4693e3d7c458 Mon Sep 17 00:00:00 2001 From: Giuliano Procida Date: Wed, 10 Jun 2020 12:59:32 +0100 Subject: [PATCH] Refactor d.context() as ctxt in report(enum_diff). * src/abg-default-reporter.cc (report): In the enum_diff overload, introduce the name ctxt to replace four occurrences of d.context(). Signed-off-by: Giuliano Procida --- src/abg-default-reporter.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/abg-default-reporter.cc b/src/abg-default-reporter.cc index 7c98d8d7..42851346 100644 --- a/src/abg-default-reporter.cc +++ b/src/abg-default-reporter.cc @@ -98,9 +98,10 @@ default_reporter::report(const enum_diff& d, ostream& out, enum_type_decl_sptr first = d.first_enum(), second = d.second_enum(); - report_name_size_and_alignment_changes(first, second, d.context(), + const diff_context_sptr& ctxt = d.context(); + report_name_size_and_alignment_changes(first, second, ctxt, out, indent); - maybe_report_diff_for_member(first, second, d.context(), out, indent); + maybe_report_diff_for_member(first, second, ctxt, out, indent); //underlying type d.underlying_type_diff()->report(out, indent); @@ -165,12 +166,12 @@ default_reporter::report(const enum_diff& d, ostream& out, << "' from value '" << i->first.get_value() << "' to '" << i->second.get_value() << "'"; - report_loc_info(second, *d.context(), out); + report_loc_info(second, *ctxt, out); out << "\n"; } } - if (d.context()->show_leaf_changes_only()) + if (ctxt->show_leaf_changes_only()) maybe_report_interfaces_impacted_by_diff(&d, out, indent); d.reported_once(true); -- 2.43.5