Browse Source

HTML Reporter: avoid doubled messages

This code looks correct, but by going through the ReportHead/Tail it
would actually end up re-calling Report() on the subclass's virtual
implementation instead of the base class's Report(), which would double
the lines.
master
Mike Williams 3 weeks ago
parent
commit
f70369c7a9
  1. 4
      common/widgets/wx_html_report_panel.cpp

4
common/widgets/wx_html_report_panel.cpp

@ -393,7 +393,7 @@ REPORTER& WX_HTML_PANEL_REPORTER::Report( const wxString& aText, SEVERITY aSever
REPORTER& WX_HTML_PANEL_REPORTER::ReportTail( const wxString& aText, SEVERITY aSeverity )
{
REPORTER::ReportTail( aText, aSeverity );
REPORTER::Report( aText, aSeverity );
wxCHECK_MSG( m_panel != nullptr, *this,
wxT( "No WX_HTML_REPORT_PANEL object defined in WX_HTML_PANEL_REPORTER." ) );
@ -405,7 +405,7 @@ REPORTER& WX_HTML_PANEL_REPORTER::ReportTail( const wxString& aText, SEVERITY aS
REPORTER& WX_HTML_PANEL_REPORTER::ReportHead( const wxString& aText, SEVERITY aSeverity )
{
REPORTER::ReportHead( aText, aSeverity );
REPORTER::Report( aText, aSeverity );
wxCHECK_MSG( m_panel != nullptr, *this,
wxT( "No WX_HTML_REPORT_PANEL object defined in WX_HTML_PANEL_REPORTER." ) );

Loading…
Cancel
Save