Domingo Alvarez Duarte wrote:
> I did some code cleanup and optimizations on Fl_Help_View, plus
> corrected a small problem with html tables that was shown with a gap
> betwen rows.
The code was converted to a completely different bracing
and indent style from the fltk standards -- please don't
reformat all the code, unless it makes the code /more/
conforming to the FLTK CMP instead of less.
If you do want to suggest such a change, it's best to keep
actual code changes separate from indent changes (for diff
purposes so bugs can be tracked)
It's actually paste to post patches as STRs, where each patch
fixes a specific thing, so that patches can be applied/checked in
separately.
I do agree with a few of the mods I could discern (it is hard to diff)..
+1 on using a single strlen(t); at the top of hv_draw()
instead of repeated strlen(t) operations throughout the code,
so +1 on that modification.
+1 on alphabetizing the colors[] array.
-1 on the mod for QCHAR_ENTRY() in quote_char(), as that causes
twice as much memory to be used for the strings. ie. your macro use of:
----
#define QCHAR_ENTRY(aname, i1, i2) { #aname, sizeof(#aname), ENC(i1,i2) }
[..]
names[] = // Quoting names
{
QCHAR_ENTRY("AElig;", 198, 174),
QCHAR_ENTRY("Aacute;", 193, 231),
QCHAR_ENTRY("Acirc;", 194, 229),
----
..will be sent to the compiler as something like:
----
names[] = // Quoting names
{
{ "AElig;", sizeof("AElig;"), ENC(198,174) }
-------- --------
\_______________\__________ compiler will allocate two separate
strings in the lib
----
Depending on the optimization of the compiler, this will double
memory use, and doesn't optimize for speed. (But it does protect
against coding mistakes)
The use of enums for tags, not sure.. didn't check what the
net change was.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev