Fl/names.h broken in Git Head

5 views
Skip to first unread message

Gonzalo Garramuño

unread,
Nov 29, 2025, 5:06:22 PMNov 29
to fltkc...@googlegroups.com
Two problems:

#include <string> missing.

std::map<..>

should probably be:

static std::map<..>

as it makes the function lead to linker errors if Fl/names.h is included
several times.

melcher....@googlemail.com

unread,
Nov 29, 2025, 5:14:41 PMNov 29
to fltk.coredev
ggar...@gmail.com schrieb am Samstag, 29. November 2025 um 23:06:22 UTC+1:
Two problems:

#include <string> missing.

Fixed within minutes.
 
std::map<..>

should probably be:

static std::map<..>

Hmm, you are probably right, but wouldn't `const char * const fl_fontnames[]`have the same issue? And that has been in the code since the file exists?

Is `std::map<int, const char*> const fl_eventnames` the better way? Testing here seems to work well.

melcher....@googlemail.com

unread,
Nov 29, 2025, 5:19:20 PMNov 29
to fltk.coredev
Never mind. `static` seems to be the right way for C++11. It's only for debugging anyway.

Reply all
Reply to author
Forward
0 new messages