Finally got a chance to poke around at this again.
Noticed Windows gcc was using 6.x while Linux was using 5.x. Added 6.x as a gcc alternative, clean built, and the problem still persists.
Removed all static const colors:
- // constants
- static const rgb_t black;
- static const rgb_t white;
- static const rgb_t green;
- static const rgb_t amber;
- static const rgb_t transparent;
and replaced with #defines:
+#define RGB_T__BLACK rgb_t(0, 0, 0)
+#define RGB_T__WHITE rgb_t(255, 255, 255)
+#define RGB_T__GREEN rgb_t(0, 255, 0)
+#define RGB_T__AMBER rgb_t(247, 170, 0)
+#define RGB_T__TRANSPARENT rgb_t(0, 0, 0, 0)
and all is well.
Let me know if this would be acceptable to submit.
Or is it better to just add the literal initialization everywhere, e.g. either this
static const pen_t pens_from_color_prom[] =
{
- rgb_t::black,
+ RGB_T__BLACK,
rgb_t(0x00, 0xff, 0x00),
rgb_t(0x00, 0x00, 0xff),
rgb_t(0x00, 0xff, 0xff),
rgb_t(0xff, 0x00, 0x00),
rgb_t(0xff, 0xff, 0x00),
rgb_t(0xff, 0x00, 0xff),
- rgb_t::white
+ RGB_T__WHITE
};
or this:
static const pen_t pens_from_color_prom[] =
{
- rgb_t::black,
+ rgb_t(0x00, 0x00, 0x00),
rgb_t(0x00, 0xff, 0x00),
rgb_t(0x00, 0x00, 0xff),
rgb_t(0x00, 0xff, 0xff),
rgb_t(0xff, 0x00, 0x00),
rgb_t(0xff, 0xff, 0x00),
rgb_t(0xff, 0x00, 0xff),
- rgb_t::white
+ rgb_t(0xff, 0xff, 0xff)
};
Your code base, you tell me which is more acceptable, if either...
H@P
Edited by H@P (10/02/16 01:06 AM)