mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
Replace simple_type with std::common_type
This commit is contained in:
parent
330dea181a
commit
67e2e154fa
7 changed files with 46 additions and 44 deletions
|
|
@ -74,7 +74,7 @@ struct cmd64
|
|||
u32 arg2;
|
||||
};
|
||||
|
||||
template <typename T, typename T2 = simple_t<T>>
|
||||
template <typename T, typename T2 = std::common_type_t<T>>
|
||||
cmd64(const T& value)
|
||||
: m_data(std::bit_cast<u64, T2>(value))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace vm
|
|||
return vm::cast(m_addr);
|
||||
}
|
||||
|
||||
operator simple_t<T>() const
|
||||
operator std::common_type_t<T>() const
|
||||
{
|
||||
return get_ref();
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ namespace vm
|
|||
return get_ref() = right.get_ref();
|
||||
}
|
||||
|
||||
T& operator =(const simple_t<T>& right) const
|
||||
T& operator =(const std::common_type_t<T>& right) const
|
||||
{
|
||||
return get_ref() = right;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ struct any32
|
|||
{
|
||||
u32 m_data;
|
||||
|
||||
template <typename T, typename T2 = simple_t<T>>
|
||||
template <typename T, typename T2 = std::common_type_t<T>>
|
||||
any32(const T& value)
|
||||
: m_data(std::bit_cast<u32, T2>(value))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue