diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 11:33:28 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 13:17:08 +0300 |
commit | f68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch) | |
tree | 2878e5b80dba5bdeba186d99661d604eb38879cd /source/blender/blenlib/tests/BLI_generic_array_test.cc | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/blenlib/tests/BLI_generic_array_test.cc')
-rw-r--r-- | source/blender/blenlib/tests/BLI_generic_array_test.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/tests/BLI_generic_array_test.cc b/source/blender/blenlib/tests/BLI_generic_array_test.cc index 52bc7728a6a..25e08f59f94 100644 --- a/source/blender/blenlib/tests/BLI_generic_array_test.cc +++ b/source/blender/blenlib/tests/BLI_generic_array_test.cc @@ -20,7 +20,7 @@ TEST(generic_array, TypeConstructor) TEST(generic_array, MoveConstructor) { - GArray array_a(CPPType::get<int32_t>(), (int64_t)10); + GArray array_a(CPPType::get<int32_t>(), int64_t(10)); GMutableSpan span_a = array_a.as_mutable_span(); MutableSpan<int32_t> typed_span_a = span_a.typed<int32_t>(); typed_span_a.fill(42); @@ -40,7 +40,7 @@ TEST(generic_array, MoveConstructor) TEST(generic_array, CopyConstructor) { - GArray array_a(CPPType::get<int32_t>(), (int64_t)10); + GArray array_a(CPPType::get<int32_t>(), int64_t(10)); GMutableSpan span_a = array_a.as_mutable_span(); MutableSpan<int32_t> typed_span_a = span_a.typed<int32_t>(); typed_span_a.fill(42); @@ -79,7 +79,7 @@ TEST(generic_array, BufferAndSizeConstructor) TEST(generic_array, Reinitialize) { - GArray array(CPPType::get<int32_t>(), (int64_t)5); + GArray array(CPPType::get<int32_t>(), int64_t(5)); EXPECT_FALSE(array.data() == nullptr); GMutableSpan span = array.as_mutable_span(); MutableSpan<int32_t> typed_span = span.typed<int32_t>(); @@ -106,7 +106,7 @@ TEST(generic_array, InContainer) { blender::Array<GArray<>> arrays; for (GArray<> &array : arrays) { - array = GArray(CPPType::get<int32_t>(), (int64_t)5); + array = GArray(CPPType::get<int32_t>(), int64_t(5)); array.as_mutable_span().typed<int32_t>().fill(55); } for (GArray<> &array : arrays) { |