1
0
forked from mirrors/0ad

split debug_assert into ENSURE and ASSERT as discussed in a previous meeting.

the old debug_assert always ran and tested the expression, which slows
down release builds. wrapping them in #ifndef NDEBUG is clumsy. the new
ASSERT behaves like assert and ENSURE like the old debug_assert. Let's
change any time-critical but not-super-important ENSURE to ASSERT to
speed up release builds. (already done in bits.h and unique_range.h)

This was SVN commit r9362.
This commit is contained in:
janwas
2011-04-30 13:01:45 +00:00
parent 6c915291cc
commit 4663ac0fe7
225 changed files with 916 additions and 932 deletions
+2 -2
View File
@@ -86,7 +86,7 @@ PlainRenderModifier::~PlainRenderModifier()
int PlainRenderModifier::BeginPass(int pass)
{
debug_assert(pass == 0);
ENSURE(pass == 0);
// set up texture environment for base pass - modulate texture and primary color
pglActiveTextureARB(GL_TEXTURE0);
@@ -140,7 +140,7 @@ WireframeRenderModifier::~WireframeRenderModifier()
int WireframeRenderModifier::BeginPass(int pass)
{
debug_assert(pass == 0);
ENSURE(pass == 0);
// first switch on wireframe
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);