Skip to content

Commit

Permalink
hide calculation of the variables used only in assert under #if !defi…
Browse files Browse the repository at this point in the history
…ned( NDEBUG )
  • Loading branch information
eugenegff committed Sep 20, 2024
1 parent 8b3ddcc commit 7bfc2cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion OgreMain/include/OgreDescriptorSetSampler.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ namespace Ogre

void checkValidity() const
{
#if OGRE_DEBUG_MODE
#if OGRE_DEBUG_MODE && !defined( NDEBUG )
size_t totalSamplersUsed = 0u;

for( size_t i = 0; i < NumShaderTypes; ++i )
Expand Down
2 changes: 1 addition & 1 deletion OgreMain/src/Animation/OgreSkeletonAnimManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ namespace Ogre

skeletonsArray.insert( it, newInstance );

#if OGRE_DEBUG_MODE
#if OGRE_DEBUG_MODE && !defined( NDEBUG )
{
// Check all depth levels respect the same ordering
FastArray<SkeletonInstance *>::const_iterator itSkel = skeletonsArray.begin();
Expand Down
4 changes: 2 additions & 2 deletions OgreMain/src/OgreDescriptorSetTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace Ogre
{
void DescriptorSetTexture::checkValidity() const
{
#if OGRE_DEBUG_MODE
#if OGRE_DEBUG_MODE && !defined( NDEBUG )
size_t totalTexturesUsed = 0u;

for( size_t i = 0; i < NumShaderTypes; ++i )
Expand Down Expand Up @@ -72,7 +72,7 @@ namespace Ogre
"This DescriptorSetTexture2 doesn't use any texture/buffer! "
"Perhaps incorrectly setup?" );

#if OGRE_DEBUG_MODE
#if OGRE_DEBUG_MODE && !defined( NDEBUG )
size_t totalTexturesUsed = 0u;

for( size_t i = 0; i < NumShaderTypes; ++i )
Expand Down

0 comments on commit 7bfc2cc

Please sign in to comment.