Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs

This commit is contained in:
Peter Keresztes Schmidt authored and Ovahlord committed 2020-07-18 22:43:24 +02:00
1 parent cbb0fe41de
commit a06e5d7d40
14 files changed
+21 -21

No files matched your search

+3 -3
View File
@@ -3324,7 +3324,7 @@ void Spell::cancel(Spell* interruptingSpell /* = nullptr */)
{
case SPELL_STATE_PREPARING:
CancelGlobalCooldown();
/* fallthrough */
[[fallthrough]];
case SPELL_STATE_DELAYED:
SendInterrupted(0);
SendCastResult(SPELL_FAILED_INTERRUPTED);
@@ -6908,7 +6908,7 @@ SpellCastResult Spell::CheckItems(uint32* param1 /*= nullptr*/, uint32* param2 /
return SPELL_FAILED_DONT_REPORT;
}
}
/* fallthrough */
[[fallthrough]];
case SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC:
{
Item* targetItem = m_targets.GetItemTarget();
@@ -8248,7 +8248,7 @@ bool WorldObjectSpellTargetCheck::operator()(WorldObject* target)
case TARGET_CHECK_RAID_CLASS:
if (_referer->getClass() != unitTarget->getClass())
return false;
/* fallthrough */
[[fallthrough]];
case TARGET_CHECK_RAID:
if (unitTarget->IsTotem())
return false;