Add fallthrough comment to switch case

This allows gcc to identify intentional fallthroughs, which are part all
-Wall. Specifically -Werror=implicit-fallthrough
This commit is contained in:
Engin Manap
2022-07-08 18:11:06 +02:00
parent 1c646057ce
commit a10abe0283
4 changed files with 5 additions and 2 deletions

View File

@@ -1284,7 +1284,7 @@ void Discreet3DSImporter::ParseColorChunk(aiColor3D *out, bool acceptPercent) {
switch (chunk.Flag) {
case Discreet3DS::CHUNK_LINRGBF:
bGamma = true;
// fallthrough
case Discreet3DS::CHUNK_RGBF:
if (sizeof(float) * 3 > diff) {
*out = clrError;
@@ -1297,6 +1297,7 @@ void Discreet3DSImporter::ParseColorChunk(aiColor3D *out, bool acceptPercent) {
case Discreet3DS::CHUNK_LINRGBB:
bGamma = true;
// fallthrough
case Discreet3DS::CHUNK_RGBB: {
if (sizeof(char) * 3 > diff) {
*out = clrError;