diff options
Diffstat (limited to 'source/blender/blenlib/intern/BLI_mempool.c')
-rw-r--r-- | source/blender/blenlib/intern/BLI_mempool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c index 28539d9ca34..1321f006e36 100644 --- a/source/blender/blenlib/intern/BLI_mempool.c +++ b/source/blender/blenlib/intern/BLI_mempool.c @@ -257,7 +257,7 @@ BLI_mempool *BLI_mempool_create(unsigned int esize, unsigned int totelem, } if (flag & BLI_MEMPOOL_ALLOW_ITER) { - pool->esize = MAX2(esize, (int)sizeof(BLI_freenode)); + pool->esize = MAX2(esize, (unsigned int)sizeof(BLI_freenode)); } else { pool->esize = esize; @@ -295,7 +295,7 @@ void *BLI_mempool_alloc(BLI_mempool *pool) pool->totused++; - if (!(pool->free)) { + if (UNLIKELY(pool->free == NULL)) { /* need to allocate a new chunk */ BLI_mempool_chunk *mpchunk = mempool_chunk_alloc(pool); mempool_chunk_add(pool, mpchunk, NULL); |