kernel: Move serialization code out of headers. (#7312)
This commit is contained in:
@ -3,6 +3,9 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <utility>
|
||||
#include <boost/serialization/array.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include "common/archives.h"
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/hle/kernel/errors.h"
|
||||
@ -10,6 +13,8 @@
|
||||
#include "core/hle/kernel/process.h"
|
||||
#include "core/hle/kernel/thread.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(Kernel::HandleTable)
|
||||
|
||||
namespace Kernel {
|
||||
namespace {
|
||||
constexpr u16 GetSlot(Handle handle) {
|
||||
@ -94,4 +99,13 @@ void HandleTable::Clear() {
|
||||
next_free_slot = 0;
|
||||
}
|
||||
|
||||
template <class Archive>
|
||||
void HandleTable::serialize(Archive& ar, const unsigned int) {
|
||||
ar& objects;
|
||||
ar& generations;
|
||||
ar& next_generation;
|
||||
ar& next_free_slot;
|
||||
}
|
||||
SERIALIZE_IMPL(HandleTable)
|
||||
|
||||
} // namespace Kernel
|
||||
|
Reference in New Issue
Block a user