diff options
| author | Dr. Dystopia <jonis9898@hotmail.com> | 2025-04-23 07:24:48 +0200 |
|---|---|---|
| committer | Dr. Dystopia <jonis9898@hotmail.com> | 2025-04-23 12:45:08 +0200 |
| commit | 947bdea590e5fe7015aa2a87190e4a8f8f36e276 (patch) | |
| tree | cabcb78cb0168e07808356a8a12272cdddfb4bee /Source/UnitTests/Common/BitFieldTest.cpp | |
| parent | 89873d623855497d8ce59c98a6d27b59a091b3e7 (diff) | |
UnitTests: Use `constexpr`
Diffstat (limited to 'Source/UnitTests/Common/BitFieldTest.cpp')
| -rw-r--r-- | Source/UnitTests/Common/BitFieldTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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; |
