Skip to content

Commit a2c0626

Browse files
committed
refactor: Remove redundant checks
1 parent cbc6ba7 commit a2c0626

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Generals/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3260,7 +3260,7 @@ void GameLogic::update()
32603260
// Previously, if the disabled mask had any bits in common with the disabled-types-to-process mask,
32613261
// the update would be processed. Now, if any *other* bits are set in the disabled mask, the update
32623262
// is no longer processed.
3263-
if (!dis.any() || u->getDisabledTypesToProcess().testForAll(dis))
3263+
if (u->getDisabledTypesToProcess().testForAll(dis))
32643264
#endif
32653265
{
32663266
USE_PERF_TIMER(GameLogic_update_normal)
@@ -3308,7 +3308,7 @@ void GameLogic::update()
33083308
// Previously, if the disabled mask had any bits in common with the disabled-types-to-process mask,
33093309
// the update would be processed. Now, if any *other* bits are set in the disabled mask, the update
33103310
// is no longer processed.
3311-
if (!dis.any() || u->getDisabledTypesToProcess().testForAll(dis))
3311+
if (u->getDisabledTypesToProcess().testForAll(dis))
33123312
#endif
33133313
{
33143314
USE_PERF_TIMER(GameLogic_update_sleepy)

GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3799,7 +3799,7 @@ void GameLogic::update()
37993799
// Previously, if the disabled mask had any bits in common with the disabled-types-to-process mask,
38003800
// the update would be processed. Now, if any *other* bits are set in the disabled mask, the update
38013801
// is no longer processed.
3802-
if (!dis.any() || u->getDisabledTypesToProcess().testForAll(dis))
3802+
if (u->getDisabledTypesToProcess().testForAll(dis))
38033803
#endif
38043804
{
38053805
USE_PERF_TIMER(GameLogic_update_normal)
@@ -3847,7 +3847,7 @@ void GameLogic::update()
38473847
// Previously, if the disabled mask had any bits in common with the disabled-types-to-process mask,
38483848
// the update would be processed. Now, if any *other* bits are set in the disabled mask, the update
38493849
// is no longer processed.
3850-
if (!dis.any() || u->getDisabledTypesToProcess().testForAll(dis))
3850+
if (u->getDisabledTypesToProcess().testForAll(dis))
38513851
#endif
38523852
{
38533853
USE_PERF_TIMER(GameLogic_update_sleepy)

0 commit comments

Comments
 (0)