diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-26 10:38:25 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-26 10:58:36 +0300 |
commit | 333e41eac6daf60c6aa9df0496a39c57d74b9c87 (patch) | |
tree | 5986e980fd64bc4ef1c3dda125a0f9dca4bab2c8 /source/blender/blenlib/tests | |
parent | 0210c4df1793799a09a35e44be286dfca88769dc (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/tests')
-rw-r--r-- | source/blender/blenlib/tests/BLI_exception_safety_test_utils.hh | 2 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_vector_test.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/tests/BLI_exception_safety_test_utils.hh b/source/blender/blenlib/tests/BLI_exception_safety_test_utils.hh index 63943e48f0e..367d8508a20 100644 --- a/source/blender/blenlib/tests/BLI_exception_safety_test_utils.hh +++ b/source/blender/blenlib/tests/BLI_exception_safety_test_utils.hh @@ -87,7 +87,7 @@ class ExceptionThrower { uint64_t hash() const { - return static_cast<uint64_t>(value); + return uint64_t(value); } friend bool operator==(const ExceptionThrower &a, const ExceptionThrower &b) diff --git a/source/blender/blenlib/tests/BLI_vector_test.cc b/source/blender/blenlib/tests/BLI_vector_test.cc index 2dd220f562b..c603f5dff27 100644 --- a/source/blender/blenlib/tests/BLI_vector_test.cc +++ b/source/blender/blenlib/tests/BLI_vector_test.cc @@ -317,7 +317,7 @@ TEST(vector, BecomeLarge) } EXPECT_EQ(vec.size(), 100); for (int i = 0; i < 100; i++) { - EXPECT_EQ(vec[i], static_cast<int>(i * 5)); + EXPECT_EQ(vec[i], int(i * 5)); } } |