- 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 //////////
# define fallthrough__ [[fallthrough]]
////////// Architecture detection //////////
#ifdef WORDS_BIGENDIAN
# define B_BIG_ENDIAN 1
#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:
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;
}
}
fallthrough__;
[[fallthrough]];
case 2:
for (int i = 0; i < kMaxSprites; i++)
{

View file

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

View file

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

View file

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

View file

@ -314,7 +314,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, short nLotag, short nHitag)
{
nVal = 3 * (nHitag / 3);
// fall through to 6,7 etc
fallthrough__;
[[fallthrough]];
}
case 6:
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);
// Fall through to case 62
fallthrough__;
[[fallthrough]];
}
case 63: // Ceiling door, kill trigger (Enemy death triggers door)
{