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>2021-10-14 02:17:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-14 05:00:24 +0300
commit576142dc85c78ced792e3440a7665ea57e45a0cc (patch)
tree4b37d4897683f23a4f42ea476751cf9ed732e4de /source/blender/blenlib/intern
parentc6e956bbb148b80cbe03d59198f8257062434cff (diff)
Cleanup: pass the sizeof(..) as the second arg for array allocation
By argument naming and convention this is the intended argument order.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r--source/blender/blenlib/intern/edgehash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/edgehash.c b/source/blender/blenlib/intern/edgehash.c
index f95619803bf..6c397fae836 100644
--- a/source/blender/blenlib/intern/edgehash.c
+++ b/source/blender/blenlib/intern/edgehash.c
@@ -230,8 +230,8 @@ EdgeHash *BLI_edgehash_new_ex(const char *info, const uint reserve)
UPDATE_SLOT_MASK(eh);
eh->length = 0;
eh->dummy_count = 0;
- eh->entries = MEM_calloc_arrayN(sizeof(EdgeHashEntry), ENTRIES_CAPACITY(eh), "eh entries");
- eh->map = MEM_malloc_arrayN(sizeof(int32_t), MAP_CAPACITY(eh), "eh map");
+ eh->entries = MEM_calloc_arrayN(ENTRIES_CAPACITY(eh), sizeof(EdgeHashEntry), "eh entries");
+ eh->map = MEM_malloc_arrayN(MAP_CAPACITY(eh), sizeof(int32_t), "eh map");
CLEAR_MAP(eh);
return eh;
}
@@ -515,8 +515,8 @@ EdgeSet *BLI_edgeset_new_ex(const char *info, const uint reserve)
es->capacity_exp = calc_capacity_exp_for_reserve(reserve);
UPDATE_SLOT_MASK(es);
es->length = 0;
- es->entries = MEM_malloc_arrayN(sizeof(Edge), ENTRIES_CAPACITY(es), "es entries");
- es->map = MEM_malloc_arrayN(sizeof(int32_t), MAP_CAPACITY(es), "es map");
+ es->entries = MEM_malloc_arrayN(ENTRIES_CAPACITY(es), sizeof(Edge), "es entries");
+ es->map = MEM_malloc_arrayN(MAP_CAPACITY(es), sizeof(int32_t), "es map");
CLEAR_MAP(es);
return es;
}