[03/11] Refactor d.context() as ctxt in report(enum_diff).

Message ID 20200610115940.26035-4-gprocida@google.com
State Committed
Headers
Series Add incomplete enum support. |

Commit Message

Giuliano Procida June 10, 2020, 11:59 a.m. UTC
  * 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 <gprocida@google.com>
---
 src/abg-default-reporter.cc | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
  

Comments

Dodji Seketeli June 29, 2020, 8:54 a.m. UTC | #1
Giuliano Procida <gprocida@google.com> a écrit:

> 	* 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 <gprocida@google.com>

Applied to master, thanks!

Cheers,
  

Patch

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);