Add fallthrough comment to switch case
This allows gcc to identify intentional fallthroughs, which are part all -Wall. Specifically -Werror=implicit-fallthroughpull/4632/head
parent
1c646057ce
commit
a10abe0283
|
@ -262,7 +262,7 @@ void Discreet3DSImporter::ConvertMaterial(D3DS::Material &oldMat,
|
|||
unsigned int iWire = 1;
|
||||
mat.AddProperty<int>((int *)&iWire, 1, AI_MATKEY_ENABLE_WIREFRAME);
|
||||
}
|
||||
|
||||
// fallthrough
|
||||
case D3DS::Discreet3DS::Gouraud:
|
||||
eShading = aiShadingMode_Gouraud;
|
||||
break;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -870,6 +870,7 @@ void ASEImporter::ConvertMaterial(ASE::Material &mat) {
|
|||
unsigned int iWire = 1;
|
||||
mat.pcInstance->AddProperty<int>((int *)&iWire, 1, AI_MATKEY_ENABLE_WIREFRAME);
|
||||
}
|
||||
// fallthrough
|
||||
case D3DS::Discreet3DS::Gouraud:
|
||||
eShading = aiShadingMode_Gouraud;
|
||||
break;
|
||||
|
|
|
@ -1540,6 +1540,7 @@ void LWOImporter::LoadLWO2File() {
|
|||
break;
|
||||
}
|
||||
// --- intentionally no break here
|
||||
// fallthrough
|
||||
case AI_LWO_VMAP: {
|
||||
if (skip)
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue