oops; also add zero-allocator macro

This commit is contained in:
ryanfleury
2021-06-24 22:52:47 -06:00
parent a533b75ce4
commit 4b8d2c3ade
2 changed files with 7 additions and 4 deletions
+1 -3
View File
@@ -942,9 +942,7 @@ MD_MapMakeBucketCount(MD_u64 bucket_count){
// make most sense with a parameter
MD_Map result = {0};
result.bucket_count = bucket_count;
// TODO(allen): push array zero
result.buckets = MD_PushArray(MD_MapBucket, bucket_count);
memset(result.buckets, 0, sizeof(*result.buckets)*bucket_count);
result.buckets = MD_PushArrayZero(MD_MapBucket, bucket_count);
return(result);
}