Replace Common::BitCast with std::bit_cast

This commit is contained in:
Pokechu22
2022-08-05 21:10:17 -07:00
parent 57c890d4fc
commit fbbfea8e8e
36 changed files with 177 additions and 215 deletions

View File

@ -3,6 +3,7 @@
#include "Common/Assembler/GekkoIRGen.h"
#include <bit>
#include <functional>
#include <map>
#include <numeric>
@ -436,13 +437,13 @@ void GekkoIRPlugin::AddBytes(T val)
else if constexpr (std::is_same_v<T, float>)
{
static_assert(sizeof(double) == sizeof(u64));
AddBytes(BitCast<u32>(val));
AddBytes(std::bit_cast<u32>(val));
}
else
{
// std::is_same_v<T, double>
static_assert(sizeof(double) == sizeof(u64));
AddBytes(BitCast<u64>(val));
AddBytes(std::bit_cast<u64>(val));
}
}