From 24d61d1cccac8c9b8e0b37781bda630a65f5f803 Mon Sep 17 00:00:00 2001 From: Emil Laine Date: Sat, 23 Apr 2016 23:32:03 +0300 Subject: [PATCH] Use ASSERTALWAYS(msg) instead of ASSERT(false && msg) Thanks @SLAwww (The first parameter to _assert is actually the message, not the expression to evaluate, so "false &&" doesn't belong in there.) Conflicts: Sources/EntitiesMP/Summoner.es --- Sources/Engine/Base/Assert.h | 2 +- Sources/EntitiesMP/Common/Particles.cpp | 2 +- Sources/EntitiesMP/Grunt.es | 2 +- Sources/EntitiesMP/GruntSka.es | 2 +- Sources/EntitiesMP/PlayerWeapons.es | 2 +- Sources/EntitiesMP/Summoner.es | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/Engine/Base/Assert.h b/Sources/Engine/Base/Assert.h index c1b45de..80f4aa3 100644 --- a/Sources/Engine/Base/Assert.h +++ b/Sources/Engine/Base/Assert.h @@ -83,7 +83,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #define BREAKPOINT \ if (1) { \ SAFEBREAKPOINT; \ - _assert(false && "hard-coded breakpoint (CroTeam)",__FILE__,__LINE__); \ + _assert("hard-coded breakpoint (CroTeam)",__FILE__,__LINE__); \ } else NOTHING /* CT DEBUG macro -- the expression is executed only in debug version */ diff --git a/Sources/EntitiesMP/Common/Particles.cpp b/Sources/EntitiesMP/Common/Particles.cpp index 73980c1..d8ad616 100755 --- a/Sources/EntitiesMP/Common/Particles.cpp +++ b/Sources/EntitiesMP/Common/Particles.cpp @@ -527,7 +527,7 @@ void Particles_ViewerLocal(CEntity *penView) break; default: - ASSERT(false && "Unknown environment particle type!"); + ASSERTALWAYS("Unknown environment particle type!"); break; } // for those EPHs that are not rendered, clear possible diff --git a/Sources/EntitiesMP/Grunt.es b/Sources/EntitiesMP/Grunt.es index e2acee1..d66015e 100644 --- a/Sources/EntitiesMP/Grunt.es +++ b/Sources/EntitiesMP/Grunt.es @@ -99,7 +99,7 @@ functions: } else if (m_gtType==GT_COMMANDER) { return &eiGruntSoldier; } else { - ASSERT(false && "Unknown grunt type!"); + ASSERTALWAYS("Unknown grunt type!"); return NULL; } }; diff --git a/Sources/EntitiesMP/GruntSka.es b/Sources/EntitiesMP/GruntSka.es index 021ff35..e142d8f 100644 --- a/Sources/EntitiesMP/GruntSka.es +++ b/Sources/EntitiesMP/GruntSka.es @@ -280,7 +280,7 @@ functions: } else if (m_gtType==GT_COMMANDER) { return &eiGruntSoldier; } else { - ASSERT(false && "Unknown grunt type!"); + ASSERTALWAYS("Unknown grunt type!"); return NULL; } }; diff --git a/Sources/EntitiesMP/PlayerWeapons.es b/Sources/EntitiesMP/PlayerWeapons.es index 49693d2..0ebc4eb 100755 --- a/Sources/EntitiesMP/PlayerWeapons.es +++ b/Sources/EntitiesMP/PlayerWeapons.es @@ -3442,7 +3442,7 @@ functions: return (WeaponType)i; } } - ASSERT(false && "Non-existant weapon in remap array!"); + ASSERTALWAYS("Non-existant weapon in remap array!"); return (WeaponType)0; } diff --git a/Sources/EntitiesMP/Summoner.es b/Sources/EntitiesMP/Summoner.es index 22e6181..5fa1ae9 100755 --- a/Sources/EntitiesMP/Summoner.es +++ b/Sources/EntitiesMP/Summoner.es @@ -618,7 +618,7 @@ functions: pen = &m_penGroup03Template01; iCount = IRnd()%m_iGroup03Count+1; } else { - ASSERT(false && "Invalid group!"); + ASSERTALWAYS("Invalid group!"); iCount = 0; // DG: this should have a deterministic value in case this happens after all! } ASSERT(iCount>0);