codewitch-honey-crisis / gfx

GFX is a device independent graphics library primarily intended for IoT MCUs but not limited to that.
https://honeythecodewitch.com/gfx
MIT License
110 stars 10 forks source link

Delete unused locally defined types #33

Closed cmumford closed 5 months ago

cmumford commented 5 months ago

Remove four types defined in gfx_pixel.hpp which were not used within their local scope. These were resulting in a build error when compiling for ESP32 in ESP-IDF v5.1.2.

In file included from lib/htcw_gfx/include/gfx_bitmap.hpp:5,
                 from lib/htcw_gfx/include/gfx_drawing.hpp:7,
                 from lib/htcw_gfx/src/gfx_drawing.cpp:1:
lib/htcw_gfx/include/gfx_pixel.hpp: In function
'constexpr gfx::gfx_result gfx::convert(PixelTypeLhs, PixelTypeRhs*, const PixelTypeRhs*)':
lib/htcw_gfx/include/gfx_pixel.hpp:1939:11: error: typedef
'using tchR = typename PixelTypeLhs::channel_by_index_unchecked<tindexR::value>'
locally defined but not used [-Werror=unused-local-typedefs]
 1939 |     using tchR = typename PixelTypeLhs::template channel_by_index_unchecked<
      |           ^~~~
lib/htcw_gfx/include/gfx_pixel.hpp:1945:11: error: typedef
'using tchG = typename PixelTypeLhs::channel_by_index_unchecked<tindexG::value>'
locally defined but not used [-Werror=unused-local-typedefs]
 1945 |     using tchG = typename PixelTypeLhs::template channel_by_index_unchecked<
      |           ^~~~
lib/htcw_gfx/include/gfx_pixel.hpp:1951:11: error: typedef
'using tchB = typename PixelTypeLhs::channel_by_index_unchecked<tindexB::value>'
locally defined but not used [-Werror=unused-local-typedefs]
 1951 |     using tchB = typename PixelTypeLhs::template channel_by_index_unchecked<
      |           ^~~~
lib/htcw_gfx/include/gfx_pixel.hpp:1957:11: error: typedef
'using tchW = typename PixelTypeLhs::channel_by_index_unchecked<tindexW::value>'
locally defined but not used [-Werror=unused-local-typedefs]
 1957 |     using tchW = typename PixelTypeLhs::template channel_by_index_unchecked<
      |           ^~~~
codewitch-honey-crisis commented 5 months ago

hey thanks for catching that! I fixed that already, but for some reason I hadn't checked it in. I just did and it's got to run through CI/CD and then it will be available.