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 <campbell@blender.org>2022-09-26 10:38:25 +0300
committerCampbell Barton <campbell@blender.org>2022-09-26 10:58:36 +0300
commit333e41eac6daf60c6aa9df0496a39c57d74b9c87 (patch)
tree5986e980fd64bc4ef1c3dda125a0f9dca4bab2c8 /source/blender/blenlib/BLI_linear_allocator.hh
parent0210c4df1793799a09a35e44be286dfca88769dc (diff)
Cleanup: replace C-style casts with functional casts for numeric types
Use function style casts in C++ headers & source.
Diffstat (limited to 'source/blender/blenlib/BLI_linear_allocator.hh')
-rw-r--r--source/blender/blenlib/BLI_linear_allocator.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_linear_allocator.hh b/source/blender/blenlib/BLI_linear_allocator.hh
index 07211de3aed..a897845db45 100644
--- a/source/blender/blenlib/BLI_linear_allocator.hh
+++ b/source/blender/blenlib/BLI_linear_allocator.hh
@@ -207,8 +207,8 @@ template<typename Allocator = GuardedAllocator> class LinearAllocator : NonCopya
Span<char> buffer = unused_borrowed_buffers_[i];
if (buffer.size() >= min_allocation_size) {
unused_borrowed_buffers_.remove_and_reorder(i);
- current_begin_ = (uintptr_t)buffer.begin();
- current_end_ = (uintptr_t)buffer.end();
+ current_begin_ = uintptr_t(buffer.begin());
+ current_end_ = uintptr_t(buffer.end());
return;
}
}
@@ -226,7 +226,7 @@ template<typename Allocator = GuardedAllocator> class LinearAllocator : NonCopya
void *buffer = allocator_.allocate(size_in_bytes, min_alignment, __func__);
owned_buffers_.append(buffer);
- current_begin_ = (uintptr_t)buffer;
+ current_begin_ = uintptr_t(buffer);
current_end_ = current_begin_ + size_in_bytes;
}