On 11/16/11 09:00, David wrote:
> I came accross this in the current fl_measure:
> strlcpy(symbol[1], p, sizeof(symbol[1]));
> which, unless I'm missing something, seems to not be used anywhere and just a
> big waste of time. ??
> In fact, maybe the whole notion of storing the symbol at symptr (symbol[0])
> is not needed. symwidth[] looks to be the only thing used in measure?
It does seem like symbol[] and all references to it
are dead code inside fl_draw.cxx::fl_measure().
I think what happened here is that the code in fl_measure()
was probably first copied from fl_draw() (which has the same
definitions,
and looks very similar) which actually /does/ make use of the symbol[]
array.
So yes, looks like fl_measure() could use some code cleanup;
that loop could probably just step over the symbol without
buffering it, and the symptr calculation could be removed.
I've submitted STR #2772 to investigate.
http://fltk.org/str.php?L2772
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk