From 947bdea590e5fe7015aa2a87190e4a8f8f36e276 Mon Sep 17 00:00:00 2001 From: "Dr. Dystopia" Date: Wed, 23 Apr 2025 07:24:48 +0200 Subject: UnitTests: Use `constexpr` --- Source/UnitTests/Common/BitFieldTest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/UnitTests/Common/BitFieldTest.cpp') diff --git a/Source/UnitTests/Common/BitFieldTest.cpp b/Source/UnitTests/Common/BitFieldTest.cpp index 24ef6bd90c..0b039ea1e3 100644 --- a/Source/UnitTests/Common/BitFieldTest.cpp +++ b/Source/UnitTests/Common/BitFieldTest.cpp @@ -494,7 +494,7 @@ union TestUnion5 TEST(BitFieldArray, StorageType) { TestUnion5 object; - const u64 arr2_hex_1 = 0b1010ull << 30; + constexpr u64 arr2_hex_1 = 0b1010ull << 30; object.hex = arr2_hex_1; const TestUnion5& objectc = object; @@ -509,17 +509,17 @@ TEST(BitFieldArray, StorageType) object.arr1[3] = 4; object.arr1[4] = 8; object.arr1[5] = 16; - const u64 arr1_hex = 0b10000'01000'00100'00010'00001'00000; + constexpr u64 arr1_hex = 0b10000'01000'00100'00010'00001'00000; EXPECT_EQ(object.hex, arr1_hex | arr2_hex_1); object.arr2[2] = object.arr2[0] = true; object.arr2[3] = object.arr2[1] = false; - const u64 arr2_hex_2 = 0b0101ull << 30; + constexpr u64 arr2_hex_2 = 0b0101ull << 30; EXPECT_EQ(object.hex, arr1_hex | arr2_hex_2); object.arr2[2] = object.arr2[1]; object.arr2[3] = objectc.arr2[0]; - const u64 arr2_hex_3 = 0b1001ull << 30; + constexpr u64 arr2_hex_3 = 0b1001ull << 30; EXPECT_EQ(object.hex, arr1_hex | arr2_hex_3); u32 counter = 0; -- cgit v1.2.3