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:
authorJacques Lucke <jacques@blender.org>2020-07-20 17:00:20 +0300
committerJacques Lucke <jacques@blender.org>2020-07-20 17:03:14 +0300
commitccc2a7996b836cd255fbb7d7f693f5b958442043 (patch)
tree0ce38fb1d1d0980dc73fa6d8816f7f4e82ba46df /source/blender/blenlib/intern
parented184050b6e787bbfb218e8ad2a0108172a1b68c (diff)
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.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r--source/blender/blenlib/intern/BLI_index_range.cc4
1 files changed, 2 insertions, 2 deletions
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<Array<int64_t, 0, RawAllocator>, 1, RawAllocator> arrays;
+static RawVector<RawArray<int64_t, 0>> 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<int64_t> IndexRange::as_span() const
}
int64_t new_size = std::max<int64_t>(1000, power_of_2_max_u(min_required_size));
- Array<int64_t, 0, RawAllocator> new_array(new_size);
+ RawArray<int64_t, 0> new_array(new_size);
for (int64_t i = 0; i < new_size; i++) {
new_array[i] = i;
}