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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user