From f68cfd6bb078482c4a779a6e26a56e2734edb5b8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 25 Sep 2022 18:33:28 +1000 Subject: Cleanup: replace C-style casts with functional casts for numeric types --- source/blender/blenlib/tests/BLI_linear_allocator_test.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/blender/blenlib/tests/BLI_linear_allocator_test.cc') 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 */ -- cgit v1.2.3