[Bf-blender-cvs] [b8bb2bb960a] master: Cleanup: warning in release builds

Campbell Barton noreply at git.blender.org
Tue Mar 5 16:50:15 CET 2019


Commit: b8bb2bb960accdd1c2fb5bdfaabb7ead898d9725
Author: Campbell Barton
Date:   Wed Mar 6 02:48:51 2019 +1100
Branches: master
https://developer.blender.org/rBb8bb2bb960accdd1c2fb5bdfaabb7ead898d9725

Cleanup: warning in release builds

===================================================================

M	source/blender/blenlib/intern/BLI_mempool.c

===================================================================

diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c
index 292cafecc98..5acc84da288 100644
--- a/source/blender/blenlib/intern/BLI_mempool.c
+++ b/source/blender/blenlib/intern/BLI_mempool.c
@@ -302,7 +302,7 @@ BLI_mempool *BLI_mempool_create(
 	pool->csize = esize * pchunk;
 
 	/* Ensure this is a power of 2, minus the rounding by element size. */
-#ifdef USE_CHUNK_POW2
+#if defined(USE_CHUNK_POW2) && !defined(NDEBUG)
 	{
 		uint final_size = (uint)MEM_SIZE_OVERHEAD + (uint)sizeof(BLI_mempool_chunk) + pool->csize;
 		BLI_assert(((uint)power_of_2_max_u(final_size) - final_size) < pool->esize);



More information about the Bf-blender-cvs mailing list