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:
Diffstat (limited to 'source/blender/blenlib/tests/BLI_linear_allocator_test.cc')
-rw-r--r--source/blender/blenlib/tests/BLI_linear_allocator_test.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenlib/tests/BLI_linear_allocator_test.cc b/source/blender/blenlib/tests/BLI_linear_allocator_test.cc
index b67683d0558..8f707789954 100644
--- a/source/blender/blenlib/tests/BLI_linear_allocator_test.cc
+++ b/source/blender/blenlib/tests/BLI_linear_allocator_test.cc
@@ -36,13 +36,13 @@ TEST(linear_allocator, PackedAllocation)
blender::AlignedBuffer<256, 32> buffer;
allocator.provide_buffer(buffer);
- uintptr_t ptr1 = (uintptr_t)allocator.allocate(10, 4); /* 0 - 10 */
- uintptr_t ptr2 = (uintptr_t)allocator.allocate(10, 4); /* 12 - 22 */
- uintptr_t ptr3 = (uintptr_t)allocator.allocate(8, 32); /* 32 - 40 */
- uintptr_t ptr4 = (uintptr_t)allocator.allocate(16, 8); /* 40 - 56 */
- uintptr_t ptr5 = (uintptr_t)allocator.allocate(1, 8); /* 56 - 57 */
- uintptr_t ptr6 = (uintptr_t)allocator.allocate(1, 4); /* 60 - 61 */
- uintptr_t ptr7 = (uintptr_t)allocator.allocate(1, 1); /* 61 - 62 */
+ uintptr_t ptr1 = uintptr_t(allocator.allocate(10, 4)); /* 0 - 10 */
+ uintptr_t ptr2 = uintptr_t(allocator.allocate(10, 4)); /* 12 - 22 */
+ uintptr_t ptr3 = uintptr_t(allocator.allocate(8, 32)); /* 32 - 40 */
+ uintptr_t ptr4 = uintptr_t(allocator.allocate(16, 8)); /* 40 - 56 */
+ uintptr_t ptr5 = uintptr_t(allocator.allocate(1, 8)); /* 56 - 57 */
+ uintptr_t ptr6 = uintptr_t(allocator.allocate(1, 4)); /* 60 - 61 */
+ uintptr_t ptr7 = uintptr_t(allocator.allocate(1, 1)); /* 61 - 62 */
EXPECT_EQ(ptr2 - ptr1, 12); /* 12 - 0 = 12 */
EXPECT_EQ(ptr3 - ptr2, 20); /* 32 - 12 = 20 */