mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-19 03:33:56 +00:00
Fix serialization of atoms (#294)
This commit is contained in:
@@ -122,7 +122,7 @@ namespace utils
|
||||
}
|
||||
else
|
||||
{
|
||||
static_assert(!is_trivially_copyable, "Key must be trivially copyable or implement serializable!");
|
||||
static_assert(is_trivially_copyable, "Key must be trivially copyable or implement serializable!");
|
||||
std::abort();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,16 +39,20 @@ struct process_context
|
||||
|
||||
struct atom_entry
|
||||
{
|
||||
std::u16string name;
|
||||
std::u16string name{};
|
||||
uint32_t ref_count = 0;
|
||||
|
||||
atom_entry(std::u16string n, const uint32_t count)
|
||||
: name(std::move(n)),
|
||||
ref_count(count)
|
||||
void serialize(utils::buffer_serializer& buffer) const
|
||||
{
|
||||
buffer.write(this->name);
|
||||
buffer.write(this->ref_count);
|
||||
}
|
||||
|
||||
atom_entry() = default;
|
||||
void deserialize(utils::buffer_deserializer& buffer)
|
||||
{
|
||||
buffer.read(this->name);
|
||||
buffer.read(this->ref_count);
|
||||
}
|
||||
};
|
||||
|
||||
process_context(x86_64_emulator& emu, memory_manager& memory, utils::clock& clock, callbacks& cb)
|
||||
|
||||
Reference in New Issue
Block a user