vindar / tgx

tgx - a tiny/teensy 3D graphics library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

swich - case fall through

karamo opened this issue · comments

In file included from ...\libraries\tgx\src/Renderer3D.h:2548,
                 from ...\libraries\tgx\src/tgx.h:37,
... In member function 'void tgx::Renderer3D<color_t, LOADED_SHADERS, ZBUFFER_t>::_drawTriangleClippedSub(int, int, const tgx::RasterizerVec4&, const tgx::RasterizerVec4&, const tgx::RasterizerVec4&) [with color_t = tgx::RGB565; int LOADED_SHADERS = 10425; ZBUFFER_t = short unsigned int]':
...\libraries\tgx\src/Renderer3D.inl:431:21: warning: this statement may fall through [-Wimplicit-fallthrough=]
                     _drawTriangleClippedSub(RASTER_TYPE, plane + 1, V1, V3, V4);
                     ^~~~~~~~~~~~~~~~~~~~~~~
...\libraries\tgx\src/Renderer3D.inl:432:17: note: here
                 case 1:
                 ^~~~

missing break; after line 431 ?

            const int nbt = _triangleClip(RASTER_TYPE, CP, off, P1, P2, P3, V1, V2, V3, V4);
            switch (nbt)
                {
                case 0:
                    _drawTriangleClippedSub(RASTER_TYPE, plane + 1, P1, P2, P3);
                    break;
                case 2: 
                    _drawTriangleClippedSub(RASTER_TYPE, plane + 1, V1, V3, V4);
                case 1:
                    _drawTriangleClippedSub(RASTER_TYPE, plane + 1, V1, V2, V3);
                }