diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-12-08 10:29:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-12-08 10:29:22 +0400 |
commit | c005fb407bbb7aac4cf138fbba903bbb2c821c93 (patch) | |
tree | a49185234ce1a01d26e8f1632e29323025322d17 /source/blender/blenlib/intern/BLI_heap.c | |
parent | 8a9a060b673bb9b8c08967ccbd8009ca24cde4d1 (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.c | 2 |
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"); |