mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
Implement std::bit_cast<>
Partial implementation of std::bit_cast from C++20. Also fix most strict-aliasing rule break warnings (gcc).
This commit is contained in:
parent
790962425c
commit
dfd50d0185
24 changed files with 145 additions and 176 deletions
|
|
@ -58,8 +58,7 @@ struct ps3_fmt_src
|
|||
template <>
|
||||
f64 ps3_fmt_src::get<f64>(std::size_t index) const
|
||||
{
|
||||
const u64 value = get<u64>(index);
|
||||
return *reinterpret_cast<const f64*>(reinterpret_cast<const u8*>(&value));
|
||||
return std::bit_cast<f64>(get<u64>(index));
|
||||
}
|
||||
|
||||
static std::string ps3_fmt(ppu_thread& context, vm::cptr<char> fmt, u32 g_count)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue