From 5d88eda64f82e1ab4abeae68f3eefb03fcd4197f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 2 Oct 2009 14:15:31 -0700 Subject: [PATCH] Meaningless nits. --- src/dwarfcmp.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/dwarfcmp.cc b/src/dwarfcmp.cc index 7062acd79..c0551c740 100644 --- a/src/dwarfcmp.cc +++ b/src/dwarfcmp.cc @@ -400,6 +400,14 @@ struct talker : public dwarf_ref_tracker } } + // When using subr::sharing_stack, it is important this argument is const. + template + static inline const typename stack_type::value_type & + path_top (const stack_type &path) + { + return path.top (); + } + // REF1 and REF2 had equal contents but different contexts. Describe them. inline void print_one_bad_context (const die1 &ref1, const die2 &ref2) { @@ -423,12 +431,12 @@ struct talker : public dwarf_ref_tracker if (right.empty ()) { cout << prefix_ - << (*left.const_top ()).offset () << " vs top-level" << endl; + << (*path_top (left)).offset () << " vs top-level" << endl; return; } // This prints the differences if it finds some. - visit (*left.const_top (), *right.const_top ()); + visit (*path_top (left), *path_top (right)); if (!visiting_result_) { cout << endl; @@ -442,7 +450,7 @@ struct talker : public dwarf_ref_tracker } if (!right.empty ()) cout << prefix_ - << "top-level vs " << (*right.const_top ()).offset () << endl; + << "top-level vs " << (*path_top (right)).offset () << endl; } inline void print_bad_context () -- 2.47.3