From ccc2a7996b836cd255fbb7d7f693f5b958442043 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 20 Jul 2020 16:00:20 +0200 Subject: BLI: add typedefs for containers that use raw allocators Those are useful when you have to create containers with static storage duration. If those would use Blender's guarded allocator, it would report memory leaks, that are not actually leaks. --- source/blender/blenlib/intern/BLI_index_range.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenlib/intern') diff --git a/source/blender/blenlib/intern/BLI_index_range.cc b/source/blender/blenlib/intern/BLI_index_range.cc index a906416b491..43c6265a17d 100644 --- a/source/blender/blenlib/intern/BLI_index_range.cc +++ b/source/blender/blenlib/intern/BLI_index_range.cc @@ -24,7 +24,7 @@ namespace blender { -static Vector, 1, RawAllocator> arrays; +static RawVector> arrays; static int64_t current_array_size = 0; static int64_t *current_array = nullptr; static std::mutex current_array_mutex; @@ -44,7 +44,7 @@ Span IndexRange::as_span() const } int64_t new_size = std::max(1000, power_of_2_max_u(min_required_size)); - Array new_array(new_size); + RawArray new_array(new_size); for (int64_t i = 0; i < new_size; i++) { new_array[i] = i; } -- cgit v1.2.3