Skip to content

Commit

Permalink
Fix ASSERT(<string_literal>)
Browse files Browse the repository at this point in the history
That would never trigger the ASSERT. Now they always do.

Conflicts:
	Sources/EntitiesMP/Summoner.es
  • Loading branch information
emlai authored and DanielGibson committed May 29, 2016
1 parent 0b24c2f commit fe23b05
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Sources/Engine/Base/Assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define BREAKPOINT \
if (1) { \
SAFEBREAKPOINT; \
_assert("hard-coded breakpoint (CroTeam)",__FILE__,__LINE__); \
_assert(false && "hard-coded breakpoint (CroTeam)",__FILE__,__LINE__); \
} else NOTHING

/* CT DEBUG macro -- the expression is executed only in debug version */
Expand Down
2 changes: 1 addition & 1 deletion Sources/EntitiesMP/Common/Particles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ void Particles_ViewerLocal(CEntity *penView)
break;

default:
ASSERT("Unknown environment particle type!");
ASSERT(false && "Unknown environment particle type!");
break;
}
// for those EPHs that are not rendered, clear possible
Expand Down
2 changes: 1 addition & 1 deletion Sources/EntitiesMP/Grunt.es
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ functions:
} else if (m_gtType==GT_COMMANDER) {
return &eiGruntSoldier;
} else {
ASSERT("Unknown grunt type!");
ASSERT(false && "Unknown grunt type!");
return NULL;
}
};
Expand Down
2 changes: 1 addition & 1 deletion Sources/EntitiesMP/GruntSka.es
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ functions:
} else if (m_gtType==GT_COMMANDER) {
return &eiGruntSoldier;
} else {
ASSERT("Unknown grunt type!");
ASSERT(false && "Unknown grunt type!");
return NULL;
}
};
Expand Down
2 changes: 1 addition & 1 deletion Sources/EntitiesMP/PlayerWeapons.es
Original file line number Diff line number Diff line change
Expand Up @@ -3442,7 +3442,7 @@ functions:
return (WeaponType)i;
}
}
ASSERT("Non-existant weapon in remap array!");
ASSERT(false && "Non-existant weapon in remap array!");
return (WeaponType)0;
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/EntitiesMP/Summoner.es
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ functions:
pen = &m_penGroup03Template01;
iCount = IRnd()%m_iGroup03Count+1;
} else {
ASSERT("Invalid group!");
ASSERT(false && "Invalid group!");
iCount = 0; // DG: this should have a deterministic value in case this happens after all!
}
ASSERT(iCount>0);
Expand Down

0 comments on commit fe23b05

Please sign in to comment.