[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] [PATCH] Avoid header.footer (was: Group premium quotes)

From: Vadim Zeitlin
Subject: [lmi] [PATCH] Avoid header.footer (was: Group premium quotes)
Date: Thu, 27 Aug 2015 20:00:54 +0200

On Wed, 26 Aug 2015 19:57:52 +0000 Greg Chicares <address@hidden> wrote:

GC> On 20150826T1906Z (revision 6270) I made a change, adding one footnote
GC> (to which we will soon add several others that are similar). To change
GC> the code as little as possible, I added a new footer_ member to
GC> struct header_data. It's initialized by header_data::fill_header_data(),
GC> where it kind of fits; but where I use it:
GC>     wxString const footer_html = "<p>" + header_.footer_ + "</p>";
GC> it's jarring to read "header_.footer_". Since you're the original author,
GC> I'd like to ask you to decide how to handle this.

 IMHO the best and the simplest is to just just rename the badly named
header_data struct, it clearly doesn't contain only the information
appearing in the header any more. I am not sure what is the best name for
it but the attached patch uses global_report_data for the struct and just
report_data_ for the variable of the struct type which should already be an
improvement. If you'd like to use different names, you could apply the
patch and then globally search and replace the identifiers above with your
preferred ones: their names are now unique, so it can be done safely,
unlike with the current sources where "header_" is used for another,
completely unrelated, field in the same file as well.

 Please let me know if you think anything more is needed here,

Attachment: 0001-No-real-changes-just-rename-header_data-to-global_re.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]