mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-01 08:48:35 +00:00
Replace Common::BitCast with std::bit_cast
This commit is contained in:
parent
57c890d4fc
commit
fbbfea8e8e
36 changed files with 177 additions and 215 deletions
|
@ -88,16 +88,3 @@ TEST(BitUtils, IsValidLowMask)
|
|||
EXPECT_FALSE(Common::IsValidLowMask((u64) ~(0b10000)));
|
||||
EXPECT_FALSE(Common::IsValidLowMask((u64)(~((u64)(~0b0) >> 1) | 0b1111)));
|
||||
}
|
||||
|
||||
TEST(BitUtils, BitCast)
|
||||
{
|
||||
EXPECT_EQ(0x00000000U, Common::BitCast<u32>(0.0f));
|
||||
EXPECT_EQ(0x80000000U, Common::BitCast<u32>(-0.0f));
|
||||
EXPECT_EQ(0x3F800000U, Common::BitCast<u32>(1.0f));
|
||||
EXPECT_EQ(0xBF800000U, Common::BitCast<u32>(-1.0f));
|
||||
|
||||
EXPECT_EQ(0x0000000000000000ULL, Common::BitCast<u64>(0.0));
|
||||
EXPECT_EQ(0x8000000000000000ULL, Common::BitCast<u64>(-0.0));
|
||||
EXPECT_EQ(0x3FF0000000000000ULL, Common::BitCast<u64>(1.0));
|
||||
EXPECT_EQ(0xBFF0000000000000ULL, Common::BitCast<u64>(-1.0));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue