- replaced fallthrough__ with [[fallthrough]] as we are requiring C++17 and don't need workarounds for that.

This commit is contained in:
Christoph Oelckers 2021-12-14 12:05:24 +01:00
parent 7daa501a4d
commit 7c4233bcf7
7 changed files with 12 additions and 16 deletions

View file

@ -15,10 +15,6 @@
////////// Language and compiler feature polyfills ////////// ////////// Language and compiler feature polyfills //////////
# define fallthrough__ [[fallthrough]]
////////// Architecture detection //////////
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
# define B_BIG_ENDIAN 1 # define B_BIG_ENDIAN 1
#else #else

View file

@ -1042,7 +1042,7 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, int
} }
} }
} }
fallthrough__; [[fallthrough]];
case 1: case 1:
for (int i = 0; i < numsectors; i++) for (int i = 0; i < numsectors; i++)
{ {
@ -1053,7 +1053,7 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, int
pXSector->freq >>= 1; pXSector->freq >>= 1;
} }
} }
fallthrough__; [[fallthrough]];
case 2: case 2:
for (int i = 0; i < kMaxSprites; i++) for (int i = 0; i < kMaxSprites; i++)
{ {

View file

@ -160,7 +160,7 @@ void PrecacheDude(spritetype *pSprite)
case kDudeGargoyleStatueStone: case kDudeGargoyleStatueStone:
seqPrecacheId(pDudeInfo->seqStartID+6, palette); seqPrecacheId(pDudeInfo->seqStartID+6, palette);
seqPrecacheId(pDudeInfo->seqStartID+6, palette); //??? seqPrecacheId(pDudeInfo->seqStartID+6, palette); //???
fallthrough__; [[fallthrough]];
case kDudeGargoyleFlesh: case kDudeGargoyleFlesh:
case kDudeGargoyleStone: case kDudeGargoyleStone:
seqPrecacheId(pDudeInfo->seqStartID+6, palette); seqPrecacheId(pDudeInfo->seqStartID+6, palette);
@ -182,7 +182,7 @@ void PrecacheDude(spritetype *pSprite)
case kDudeCerberusTwoHead: case kDudeCerberusTwoHead:
seqPrecacheId(pDudeInfo->seqStartID+6, palette); seqPrecacheId(pDudeInfo->seqStartID+6, palette);
seqPrecacheId(pDudeInfo->seqStartID+7, palette); seqPrecacheId(pDudeInfo->seqStartID+7, palette);
fallthrough__; [[fallthrough]];
case kDudeHand: case kDudeHand:
case kDudeBoneEel: case kDudeBoneEel:
case kDudeBat: case kDudeBat:
@ -196,10 +196,10 @@ void PrecacheDude(spritetype *pSprite)
case kDudeZombieAxeBuried: case kDudeZombieAxeBuried:
seqPrecacheId(pDudeInfo->seqStartID+12, palette); seqPrecacheId(pDudeInfo->seqStartID+12, palette);
seqPrecacheId(pDudeInfo->seqStartID+9, palette); seqPrecacheId(pDudeInfo->seqStartID+9, palette);
fallthrough__; [[fallthrough]];
case kDudeZombieAxeLaying: case kDudeZombieAxeLaying:
seqPrecacheId(pDudeInfo->seqStartID+10, palette); seqPrecacheId(pDudeInfo->seqStartID+10, palette);
fallthrough__; [[fallthrough]];
case kDudeZombieAxeNormal: case kDudeZombieAxeNormal:
seqPrecacheId(pDudeInfo->seqStartID+6, palette); seqPrecacheId(pDudeInfo->seqStartID+6, palette);
seqPrecacheId(pDudeInfo->seqStartID+7, palette); seqPrecacheId(pDudeInfo->seqStartID+7, palette);

View file

@ -306,7 +306,7 @@ void OperateSprite(DBloodActor* actor, EVENT event)
break; break;
case kCmdSpriteProximity: case kCmdSpriteProximity:
if (pXSprite->state) break; if (pXSprite->state) break;
fallthrough__; [[fallthrough]];
case kCmdOn: case kCmdOn:
case kCmdSpritePush: case kCmdSpritePush:
case kCmdSpriteTouch: case kCmdSpriteTouch:
@ -494,7 +494,7 @@ void OperateSprite(DBloodActor* actor, EVENT event)
break; break;
case kThingTNTBarrel: case kThingTNTBarrel:
if (pSprite->flags & kHitagRespawn) return; if (pSprite->flags & kHitagRespawn) return;
fallthrough__; [[fallthrough]];
case kThingArmedTNTStick: case kThingArmedTNTStick:
case kThingArmedTNTBundle: case kThingArmedTNTBundle:
case kThingArmedSpray: case kThingArmedSpray:
@ -528,7 +528,7 @@ void OperateSprite(DBloodActor* actor, EVENT event)
sfxPlay3DSound(pSprite, 452, 0, 0); sfxPlay3DSound(pSprite, 452, 0, 0);
evPostActor(actor, 30, kCmdOff); evPostActor(actor, 30, kCmdOff);
pXSprite->state = 1; pXSprite->state = 1;
fallthrough__; [[fallthrough]];
case kCmdOn: case kCmdOn:
sfxPlay3DSound(pSprite, 451, 0, 0); sfxPlay3DSound(pSprite, 451, 0, 0);
pXSprite->Proximity = 1; pXSprite->Proximity = 1;

View file

@ -817,7 +817,7 @@ loc_flag:
nQuake[nPlayer] = 128; nQuake[nPlayer] = 128;
} }
// fall through // fall through
fallthrough__; [[fallthrough]];
} }
case kWeaponPistol: case kWeaponPistol:
{ {

View file

@ -314,7 +314,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, short nLotag, short nHitag)
{ {
nVal = 3 * (nHitag / 3); nVal = 3 * (nHitag / 3);
// fall through to 6,7 etc // fall through to 6,7 etc
fallthrough__; [[fallthrough]];
} }
case 6: case 6:
case 7: case 7:

View file

@ -1374,7 +1374,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second); runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
// Fall through to case 62 // Fall through to case 62
fallthrough__; [[fallthrough]];
} }
case 63: // Ceiling door, kill trigger (Enemy death triggers door) case 63: // Ceiling door, kill trigger (Enemy death triggers door)
{ {