Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-12-08 10:29:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-08 10:29:22 +0400
commitc005fb407bbb7aac4cf138fbba903bbb2c821c93 (patch)
treea49185234ce1a01d26e8f1632e29323025322d17 /source/blender/blenlib/intern/BLI_heap.c
parent8a9a060b673bb9b8c08967ccbd8009ca24cde4d1 (diff)
Util-defines: avoid multiple calculation/access for MIN/MAX macros
Diffstat (limited to 'source/blender/blenlib/intern/BLI_heap.c')
-rw-r--r--source/blender/blenlib/intern/BLI_heap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/BLI_heap.c b/source/blender/blenlib/intern/BLI_heap.c
index 206a8041c4a..55dee4e8677 100644
--- a/source/blender/blenlib/intern/BLI_heap.c
+++ b/source/blender/blenlib/intern/BLI_heap.c
@@ -125,7 +125,7 @@ Heap *BLI_heap_new_ex(unsigned int tot_reserve)
{
Heap *heap = (Heap *)MEM_callocN(sizeof(Heap), __func__);
/* ensure we have at least one so we can keep doubling it */
- heap->bufsize = MAX2(1, tot_reserve);
+ heap->bufsize = MAX2(1u, tot_reserve);
heap->tree = (HeapNode **)MEM_mallocN(heap->bufsize * sizeof(HeapNode *), "BLIHeapTree");
heap->arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "heap arena");