diff --git a/Core/Libraries/Source/WWVegas/WWLib/always.h b/Core/Libraries/Source/WWVegas/WWLib/always.h index 7439bc9e62..255a306647 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/always.h +++ b/Core/Libraries/Source/WWVegas/WWLib/always.h @@ -46,7 +46,6 @@ // TheSuperHackers @compile feliwir 17/04/2025 include utility macros for cross-platform compatibility #include #include - #include // Disable warning about exception handling not being enabled. It's used as part of STL - in a part of STL we don't use. diff --git a/Dependencies/Utility/Utility/CppMacros.h b/Dependencies/Utility/Utility/CppMacros.h index 57aaa75abc..9c0ed332cb 100644 --- a/Dependencies/Utility/Utility/CppMacros.h +++ b/Dependencies/Utility/Utility/CppMacros.h @@ -21,8 +21,12 @@ #if __cplusplus >= 201703L #define NOEXCEPT_17 noexcept +#define REGISTER +#define FALLTHROUGH [[fallthrough]] #else #define NOEXCEPT_17 +#define REGISTER register +#define FALLTHROUGH #endif // noexcept for methods of IUNKNOWN interface @@ -38,12 +42,6 @@ #define CPP_11(code) #endif -#if __cplusplus >= 201703L -#define REGISTER -#else -#define REGISTER register -#endif - #if __cplusplus < 201103L #define static_assert(expr, msg) #endif diff --git a/Generals/Code/GameEngine/Source/Common/RandomValue.cpp b/Generals/Code/GameEngine/Source/Common/RandomValue.cpp index 194ec0cea7..8b2f5dafcc 100644 --- a/Generals/Code/GameEngine/Source/Common/RandomValue.cpp +++ b/Generals/Code/GameEngine/Source/Common/RandomValue.cpp @@ -383,6 +383,7 @@ Real GameClientRandomVariable::getValue( void ) const if (m_low == m_high) { return m_low; } // else return as though a UNIFORM. + FALLTHROUGH; case UNIFORM: return GameClientRandomValueReal( m_low, m_high ); @@ -427,6 +428,7 @@ Real GameLogicRandomVariable::getValue( void ) const if (m_low == m_high) { return m_low; } // else return as though a UNIFORM. + FALLTHROUGH; case UNIFORM: return GameLogicRandomValueReal( m_low, m_high ); diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp index 0f9492d751..59f9c092c8 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp @@ -1877,20 +1877,23 @@ void grabSinglePlayerInfo( void ) { Bool isFriend = TRUE; - // set the string we'll be compairing to + // set the string we'll be comparing to switch (j) { case USA_ENEMY: isFriend = FALSE; + FALLTHROUGH; case USA_FRIEND: side.set("America"); break; case CHINA_ENEMY: isFriend = FALSE; + FALLTHROUGH; case CHINA_FRIEND: side.set("China"); break; case GLA_ENEMY: - isFriend = FALSE; + isFriend = FALSE; + FALLTHROUGH; case GLA_FRIEND: side.set("GLA"); break; diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GameWindowTransitionsStyles.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GameWindowTransitionsStyles.cpp index c968b80232..b95f23b492 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GameWindowTransitionsStyles.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GameWindowTransitionsStyles.cpp @@ -142,6 +142,8 @@ void FlashTransition::update( Int frame ) } // end if } + FALLTHROUGH; + case FLASHTRANSITION_FADE_IN_2: case FLASHTRANSITION_FADE_IN_3: { @@ -810,8 +812,8 @@ void ScaleUpTransition::update( Int frame ) TheAudio->addAudioEvent( &buttonClick ); } // end if - } + FALLTHROUGH; case SCALEUPTRANSITION_2: case SCALEUPTRANSITION_3: @@ -933,8 +935,8 @@ void ScoreScaleUpTransition::update( Int frame ) TheAudio->addAudioEvent( &buttonClick ); } // end if - } + FALLTHROUGH; case SCORESCALEUPTRANSITION_2: case SCORESCALEUPTRANSITION_3: diff --git a/Generals/Code/GameEngine/Source/GameClient/GameText.cpp b/Generals/Code/GameEngine/Source/GameClient/GameText.cpp index 6a8f1f485b..f720c480dc 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GameText.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GameText.cpp @@ -630,6 +630,7 @@ void GameTextManager::readToEndOfQuote( File *file, Char *in, Char *out, Char *w } state = 1; + FALLTHROUGH; case 1: if ( ( ch >= 'a' && ch <= 'z') || ( ch >= 'A' && ch <='Z') || (ch >= '0' && ch <= '9') || ch == '_' ) { @@ -638,6 +639,7 @@ void GameTextManager::readToEndOfQuote( File *file, Char *in, Char *out, Char *w break; } state = 2; + FALLTHROUGH; case 2: break; } diff --git a/Generals/Code/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp b/Generals/Code/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp index 0241f4fa5b..dfb78fa691 100644 --- a/Generals/Code/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp @@ -204,7 +204,7 @@ GameMessageDisposition WindowTranslator::translateGameMessage(const GameMessage //If we release the button outside forceKeepMessage = TRUE; } - //FALL THROUGH INTENTIONALLY! + FALLTHROUGH; //FALL THROUGH INTENTIONALLY! } case GameMessage::MSG_RAW_MOUSE_POSITION: case GameMessage::MSG_RAW_MOUSE_LEFT_BUTTON_DOWN: diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp index d69e1f7a22..db4372c153 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp @@ -494,28 +494,28 @@ StateReturnType HackInternetState::update() { break; } - //If entry missing, fall through! + FALLTHROUGH; //If entry missing, fall through! case LEVEL_ELITE: amount = ai->getEliteCashAmount(); if( amount ) { break; } - //If entry missing, fall through! + FALLTHROUGH; //If entry missing, fall through! case LEVEL_VETERAN: amount = ai->getVeteranCashAmount(); if( amount ) { break; } - //If entry missing, fall through! + FALLTHROUGH; //If entry missing, fall through! case LEVEL_REGULAR: amount = ai->getRegularCashAmount(); if( amount ) { break; } - //If entry missing, fall through! + FALLTHROUGH; //If entry missing, fall through! default: amount = 1; break; diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp index 12d0b138d1..9f1764699c 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp @@ -2216,7 +2216,7 @@ void JetAIUpdate::aiDoCommand(const AICommandParms* parms) if (isParkedAt(parms->m_obj)) return; - // else fall thru to the default case! + FALLTHROUGH; // else fall thru to the default case! default: { diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/MissileAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/MissileAIUpdate.cpp index 725840f56d..774913b42b 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/MissileAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/MissileAIUpdate.cpp @@ -652,6 +652,8 @@ UpdateSleepTime MissileAIUpdate::update() { break; } + FALLTHROUGH; + case IGNITION: doIgnitionState(); break; diff --git a/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/Scripts.cpp b/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/Scripts.cpp index 0499d5b508..b5ca0f0574 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/Scripts.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/Scripts.cpp @@ -1776,7 +1776,7 @@ void Parameter::qualify(const AsciiString& qualifier, if (m_string == THIS_TEAM) { break; } - /// otherwise drop down & qualify. + FALLTHROUGH; /// otherwise drop down & qualify. case SCRIPT: case COUNTER: case FLAG: diff --git a/Generals/Code/Libraries/Source/WWVegas/WW3D2/meshmdlio.cpp b/Generals/Code/Libraries/Source/WWVegas/WW3D2/meshmdlio.cpp index 4d72ffacfe..90cecd7e81 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WW3D2/meshmdlio.cpp +++ b/Generals/Code/Libraries/Source/WWVegas/WW3D2/meshmdlio.cpp @@ -344,7 +344,7 @@ WW3DErrorType MeshModelClass::Load_W3D(ChunkLoadClass & cload) Set_Flag (PRELIT_LIGHTMAP_MULTI_TEXTURE, true); break; } - // Else fall thru... + FALLTHROUGH; // Else fall thru... case WW3D::PRELIT_MODE_LIGHTMAP_MULTI_PASS: if (context->Header.Attributes & W3D_MESH_FLAG_PRELIT_LIGHTMAP_MULTI_PASS) { @@ -352,7 +352,7 @@ WW3DErrorType MeshModelClass::Load_W3D(ChunkLoadClass & cload) Set_Flag (PRELIT_LIGHTMAP_MULTI_PASS, true); break; } - // Else fall thru... + FALLTHROUGH; // Else fall thru... case WW3D::PRELIT_MODE_VERTEX: if (context->Header.Attributes & W3D_MESH_FLAG_PRELIT_VERTEX) { @@ -360,7 +360,7 @@ WW3DErrorType MeshModelClass::Load_W3D(ChunkLoadClass & cload) Set_Flag (PRELIT_VERTEX, true); break; } - // Else fall thru... + FALLTHROUGH; // Else fall thru... default: diff --git a/GeneralsMD/Code/GameEngine/Source/Common/RandomValue.cpp b/GeneralsMD/Code/GameEngine/Source/Common/RandomValue.cpp index 5fa23da03b..c1b41acd5b 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/RandomValue.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/RandomValue.cpp @@ -383,6 +383,7 @@ Real GameClientRandomVariable::getValue( void ) const if (m_low == m_high) { return m_low; } // else return as though a UNIFORM. + FALLTHROUGH; case UNIFORM: return GameClientRandomValueReal( m_low, m_high ); @@ -427,6 +428,7 @@ Real GameLogicRandomVariable::getValue( void ) const if (m_low == m_high) { return m_low; } // else return as though a UNIFORM. + FALLTHROUGH; case UNIFORM: return GameLogicRandomValueReal( m_low, m_high ); diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp index 786ba75d53..23e3960ebc 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp @@ -2145,20 +2145,23 @@ void grabSinglePlayerInfo( void ) { Bool isFriend = TRUE; - // set the string we'll be compairing to + // set the string we'll be comparing to switch (j) { case USA_ENEMY: isFriend = FALSE; + FALLTHROUGH; case USA_FRIEND: side.set("USA"); break; case CHINA_ENEMY: isFriend = FALSE; + FALLTHROUGH; case CHINA_FRIEND: side.set("China"); break; case GLA_ENEMY: - isFriend = FALSE; + isFriend = FALSE; + FALLTHROUGH; case GLA_FRIEND: side.set("GLA"); break; diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowTransitionsStyles.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowTransitionsStyles.cpp index f9795b2e5e..20ea8ea96a 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowTransitionsStyles.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowTransitionsStyles.cpp @@ -142,6 +142,8 @@ void FlashTransition::update( Int frame ) } // end if } + FALLTHROUGH; + case FLASHTRANSITION_FADE_IN_2: case FLASHTRANSITION_FADE_IN_3: { @@ -810,8 +812,8 @@ void ScaleUpTransition::update( Int frame ) TheAudio->addAudioEvent( &buttonClick ); } // end if - } + FALLTHROUGH; case SCALEUPTRANSITION_2: case SCALEUPTRANSITION_3: @@ -933,8 +935,8 @@ void ScoreScaleUpTransition::update( Int frame ) TheAudio->addAudioEvent( &buttonClick ); } // end if - } + FALLTHROUGH; case SCORESCALEUPTRANSITION_2: case SCORESCALEUPTRANSITION_3: diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GameText.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GameText.cpp index 9b6e207f9e..163018fbd2 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GameText.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GameText.cpp @@ -630,6 +630,7 @@ void GameTextManager::readToEndOfQuote( File *file, Char *in, Char *out, Char *w } state = 1; + FALLTHROUGH; case 1: if ( ( ch >= 'a' && ch <= 'z') || ( ch >= 'A' && ch <='Z') || (ch >= '0' && ch <= '9') || ch == '_' ) { @@ -638,6 +639,7 @@ void GameTextManager::readToEndOfQuote( File *file, Char *in, Char *out, Char *w break; } state = 2; + FALLTHROUGH; case 2: break; } diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp index 69cd51cf2f..c19fad2b61 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp @@ -3704,7 +3704,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage break; } - //intentional fall through + FALLTHROUGH; //intentional fall through } case GameMessage::MSG_MOUSE_RIGHT_CLICK: { @@ -3767,7 +3767,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage break; } - //intentional fall through + FALLTHROUGH; //intentional fall through } case GameMessage::MSG_MOUSE_LEFT_CLICK: { diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp index cce35480d4..8a934a8f7e 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp @@ -222,7 +222,7 @@ GameMessageDisposition WindowTranslator::translateGameMessage(const GameMessage //If we release the button outside forceKeepMessage = TRUE; } - //FALL THROUGH INTENTIONALLY! + FALLTHROUGH; //FALL THROUGH INTENTIONALLY! } case GameMessage::MSG_RAW_MOUSE_POSITION: case GameMessage::MSG_RAW_MOUSE_LEFT_BUTTON_DOWN: diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp index 0b1f90090a..4599b4b94c 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/HackInternetAIUpdate.cpp @@ -506,28 +506,28 @@ StateReturnType HackInternetState::update() { break; } - //If entry missing, fall through! + FALLTHROUGH; //If entry missing, fall through! case LEVEL_ELITE: amount = ai->getEliteCashAmount(); if( amount ) { break; } - //If entry missing, fall through! + FALLTHROUGH; //If entry missing, fall through! case LEVEL_VETERAN: amount = ai->getVeteranCashAmount(); if( amount ) { break; } - //If entry missing, fall through! + FALLTHROUGH; //If entry missing, fall through! case LEVEL_REGULAR: amount = ai->getRegularCashAmount(); if( amount ) { break; } - //If entry missing, fall through! + FALLTHROUGH; //If entry missing, fall through! default: amount = 1; break; diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp index cca2a49e8d..b37edd7dc8 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp @@ -2450,7 +2450,7 @@ void JetAIUpdate::aiDoCommand(const AICommandParms* parms) if (isParkedAt(parms->m_obj)) return; - // else fall thru to the default case! + FALLTHROUGH; // else fall thru to the default case! default: { diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/MissileAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/MissileAIUpdate.cpp index 657593267d..8975acb9d5 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/MissileAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/MissileAIUpdate.cpp @@ -707,6 +707,8 @@ UpdateSleepTime MissileAIUpdate::update() { break; } + FALLTHROUGH; + case IGNITION: doIgnitionState(); break; diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp index f38cf423b8..b089734ad9 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp @@ -280,7 +280,7 @@ UpdateSleepTime SpecialAbilityUpdate::update( void ) // it's been captured by a colleague! we should stop. shouldAbort = TRUE; } - //deliberately falling through... + FALLTHROUGH; //deliberately falling through... } case SPECIAL_BLACKLOTUS_STEAL_CASH_HACK: case SPECIAL_BOOBY_TRAP: @@ -309,7 +309,7 @@ UpdateSleepTime SpecialAbilityUpdate::update( void ) { if ( target->isKindOf( KINDOF_STRUCTURE ) ) shouldAbort = TRUE; - //deliberately falling through + FALLTHROUGH; //deliberately falling through } case SPECIAL_BLACKLOTUS_DISABLE_VEHICLE_HACK: { diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/Scripts.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/Scripts.cpp index 90ec1bdcd2..c90e2a4acb 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/Scripts.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/Scripts.cpp @@ -1837,7 +1837,7 @@ void Parameter::qualify(const AsciiString& qualifier, if (m_string == THIS_TEAM) { break; } - /// otherwise drop down & qualify. + FALLTHROUGH; /// otherwise drop down & qualify. case SCRIPT: case COUNTER: case FLAG: diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/meshmdlio.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/meshmdlio.cpp index 9cfcad01d7..4ebff7316d 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/meshmdlio.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/meshmdlio.cpp @@ -344,7 +344,7 @@ WW3DErrorType MeshModelClass::Load_W3D(ChunkLoadClass & cload) Set_Flag (PRELIT_LIGHTMAP_MULTI_TEXTURE, true); break; } - // Else fall thru... + FALLTHROUGH; // Else fall thru... case WW3D::PRELIT_MODE_LIGHTMAP_MULTI_PASS: if (context->Header.Attributes & W3D_MESH_FLAG_PRELIT_LIGHTMAP_MULTI_PASS) { @@ -352,7 +352,7 @@ WW3DErrorType MeshModelClass::Load_W3D(ChunkLoadClass & cload) Set_Flag (PRELIT_LIGHTMAP_MULTI_PASS, true); break; } - // Else fall thru... + FALLTHROUGH; // Else fall thru... case WW3D::PRELIT_MODE_VERTEX: if (context->Header.Attributes & W3D_MESH_FLAG_PRELIT_VERTEX) { @@ -360,7 +360,7 @@ WW3DErrorType MeshModelClass::Load_W3D(ChunkLoadClass & cload) Set_Flag (PRELIT_VERTEX, true); break; } - // Else fall thru... + FALLTHROUGH; // Else fall thru... default: diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp index 7982141ca3..92e3a66df4 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp @@ -895,7 +895,7 @@ void TextureLoader::Process_Foreground_Thumbnail(TextureLoadTaskClass *task) switch (task->Get_State()) { case TextureLoadTaskClass::STATE_NONE: Load_Thumbnail(task->Peek_Texture()); - // NOTE: fall-through is intentional + FALLTHROUGH; // NOTE: fall-through is intentional case TextureLoadTaskClass::STATE_COMPLETE: task->Destroy(); @@ -1260,12 +1260,15 @@ void TextureLoadTaskClass::Finish_Load(void) Apply_Missing_Texture(); break; } + FALLTHROUGH; case STATE_LOAD_BEGUN: Load(); + FALLTHROUGH; case STATE_LOAD_MIPMAP: End_Load(); + FALLTHROUGH; default: break;