WLED_DISABLE_2D does not compile (#4736)

the compilation fails with tons of errors if you try to compile using WLED_DISABLE_2D 
"message": "enclosing class of constexpr non-static member function 'bool Segment::is2D() const' is not a literal type",
"LineNumber": 766,
This commit is contained in:
ingDIY 2025-06-20 15:42:23 +02:00 committed by GitHub
parent 05557ca790
commit 3f03cb4d2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -763,7 +763,7 @@ class Segment {
inline void drawCharacter(unsigned char chr, int16_t x, int16_t y, uint8_t w, uint8_t h, CRGB c, CRGB c2 = CRGB::Black, int8_t rotate = 0) const { drawCharacter(chr, x, y, w, h, RGBW32(c.r,c.g,c.b,0), RGBW32(c2.r,c2.g,c2.b,0), rotate); } // automatic inline
inline void fill_solid(CRGB c) const { fill(RGBW32(c.r,c.g,c.b,0)); }
#else
inline constexpr bool is2D() const { return false; }
inline bool is2D() const { return false; }
inline void setPixelColorXY(int x, int y, uint32_t c) const { setPixelColor(x, c); }
inline void setPixelColorXY(unsigned x, unsigned y, uint32_t c) const { setPixelColor(int(x), c); }
inline void setPixelColorXY(int x, int y, byte r, byte g, byte b, byte w = 0) const { setPixelColor(x, RGBW32(r,g,b,w)); }