mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-10 21:00:06 +00:00
Added POD serialization
This commit is contained in:
parent
6940c99ed6
commit
dc04774ece
8 changed files with 68 additions and 20 deletions
|
@ -10,6 +10,7 @@
|
|||
#include "common/bit_field.h"
|
||||
#include "common/common_funcs.h"
|
||||
#include "common/common_types.h"
|
||||
#include "common/pod.h"
|
||||
|
||||
namespace Memory {
|
||||
class MemorySystem;
|
||||
|
@ -296,6 +297,8 @@ private:
|
|||
static inline u32 DecodeAddressRegister(u32 register_value) {
|
||||
return register_value * 8;
|
||||
}
|
||||
|
||||
SERIALIZE_AS_POD
|
||||
};
|
||||
static_assert(std::is_standard_layout<Regs>::value, "Structure does not use standard layout");
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "common/bit_field.h"
|
||||
#include "common/common_funcs.h"
|
||||
#include "common/common_types.h"
|
||||
#include "common/pod.h"
|
||||
|
||||
#define LCD_REG_INDEX(field_name) (offsetof(LCD::Regs, field_name) / sizeof(u32))
|
||||
|
||||
|
@ -50,6 +51,8 @@ struct Regs {
|
|||
u32* content = reinterpret_cast<u32*>(this);
|
||||
return content[index];
|
||||
}
|
||||
|
||||
SERIALIZE_AS_POD
|
||||
};
|
||||
static_assert(std::is_standard_layout<Regs>::value, "Structure does not use standard layout");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue