replace is_pod with is_standard_layout && is_trivially_copyable
This commit is contained in:
parent
2c2fd21d41
commit
c629af6319
|
@ -54,7 +54,7 @@ struct TypedHIDInputData
|
||||||
|
|
||||||
T data;
|
T data;
|
||||||
|
|
||||||
static_assert(std::is_pod<T>());
|
static_assert(std::is_standard_layout_v<T> && std::is_trivially_copyable_v<T>);
|
||||||
|
|
||||||
u8* GetData() { return reinterpret_cast<u8*>(this); }
|
u8* GetData() { return reinterpret_cast<u8*>(this); }
|
||||||
const u8* GetData() const { return reinterpret_cast<const u8*>(this); }
|
const u8* GetData() const { return reinterpret_cast<const u8*>(this); }
|
||||||
|
|
|
@ -26,7 +26,7 @@ protected:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static int RawRead(T* reg_data, u8 addr, int count, u8* data_out)
|
static int RawRead(T* reg_data, u8 addr, int count, u8* data_out)
|
||||||
{
|
{
|
||||||
static_assert(std::is_pod<T>::value);
|
static_assert(std::is_standard_layout_v<T> && std::is_trivially_copyable_v<T>);
|
||||||
static_assert(0x100 == sizeof(T));
|
static_assert(0x100 == sizeof(T));
|
||||||
|
|
||||||
// TODO: addr wraps around after 0xff
|
// TODO: addr wraps around after 0xff
|
||||||
|
@ -42,7 +42,7 @@ protected:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static int RawWrite(T* reg_data, u8 addr, int count, const u8* data_in)
|
static int RawWrite(T* reg_data, u8 addr, int count, const u8* data_in)
|
||||||
{
|
{
|
||||||
static_assert(std::is_pod<T>::value);
|
static_assert(std::is_standard_layout_v<T> && std::is_trivially_copyable_v<T>);
|
||||||
static_assert(0x100 == sizeof(T));
|
static_assert(0x100 == sizeof(T));
|
||||||
|
|
||||||
// TODO: addr wraps around after 0xff
|
// TODO: addr wraps around after 0xff
|
||||||
|
|
Loading…
Reference in New Issue