citra-emu
/
citra
Archived
1
0
Fork 0

clang-format fixes

This commit is contained in:
Hamish Milne 2019-12-27 21:07:29 +00:00 committed by zhupengfei
parent d482fb359c
commit 7b846ffa98
117 changed files with 797 additions and 925 deletions

View File

@ -5,14 +5,9 @@
using iarchive = boost::archive::binary_iarchive; using iarchive = boost::archive::binary_iarchive;
using oarchive = boost::archive::binary_oarchive; using oarchive = boost::archive::binary_oarchive;
#define SERIALIZE_IMPL(A) template void A::serialize<iarchive>( \ #define SERIALIZE_IMPL(A) \
iarchive & ar, \ template void A::serialize<iarchive>(iarchive & ar, const unsigned int file_version); \
const unsigned int file_version \ template void A::serialize<oarchive>(oarchive & ar, const unsigned int file_version);
); \
template void A::serialize<oarchive>( \
oarchive & ar, \
const unsigned int file_version \
);
#define SERIALIZE_EXPORT_IMPL(A) \ #define SERIALIZE_EXPORT_IMPL(A) \
BOOST_SERIALIZATION_REGISTER_ARCHIVE(iarchive) \ BOOST_SERIALIZATION_REGISTER_ARCHIVE(iarchive) \

View File

@ -13,17 +13,15 @@ public:
}; };
#define BOOST_SERIALIZATION_CONSTRUCT(T) \ #define BOOST_SERIALIZATION_CONSTRUCT(T) \
namespace boost { namespace serialization { \ namespace boost { \
namespace serialization { \
template <class Archive> \ template <class Archive> \
inline void save_construct_data( \ inline void save_construct_data(Archive& ar, const T* t, const unsigned int file_version) { \
Archive & ar, const T * t, const unsigned int file_version \
){ \
construct_access::save_construct(ar, t, file_version); \ construct_access::save_construct(ar, t, file_version); \
} \ } \
template <class Archive> \ template <class Archive> \
inline void load_construct_data( \ inline void load_construct_data(Archive& ar, T* t, const unsigned int file_version) { \
Archive & ar, T * t, const unsigned int file_version \
){ \
construct_access::load_construct(ar, t, file_version); \ construct_access::load_construct(ar, t, file_version); \
} \ } \
}} } \
}

View File

@ -12,9 +12,6 @@
ar.load_binary(this, sizeof(*this)); \ ar.load_binary(this, sizeof(*this)); \
} \ } \
template <class Archive> \ template <class Archive> \
void serialize( \ void serialize(Archive& ar, const unsigned int file_version) { \
Archive &ar, \
const unsigned int file_version \
){ \
boost::serialization::split_member(ar, *this, file_version); \ boost::serialization::split_member(ar, *this, file_version); \
} }

View File

@ -6,20 +6,17 @@
namespace boost::serialization { namespace boost::serialization {
template <class Archive, class T> template <class Archive, class T>
void serialize(Archive& ar, std::atomic<T>& value, const unsigned int file_version) void serialize(Archive& ar, std::atomic<T>& value, const unsigned int file_version) {
{
boost::serialization::split_free(ar, value, file_version); boost::serialization::split_free(ar, value, file_version);
} }
template <class Archive, class T> template <class Archive, class T>
void save(Archive& ar, const std::atomic<T>& value, const unsigned int file_version) void save(Archive& ar, const std::atomic<T>& value, const unsigned int file_version) {
{
ar << value.load(); ar << value.load();
} }
template <class Archive, class T> template <class Archive, class T>
void load(Archive& ar, std::atomic<T>& value, const unsigned int file_version) void load(Archive& ar, std::atomic<T>& value, const unsigned int file_version) {
{
T tmp; T tmp;
ar >> tmp; ar >> tmp;
value.store(tmp); value.store(tmp);

View File

@ -1,14 +1,13 @@
#pragma once #pragma once
#include "common/common_types.h"
#include <boost/container/flat_set.hpp> #include <boost/container/flat_set.hpp>
#include <boost/serialization/split_free.hpp> #include <boost/serialization/split_free.hpp>
#include "common/common_types.h"
namespace boost::serialization { namespace boost::serialization {
template <class Archive, class T> template <class Archive, class T>
void save(Archive& ar, const boost::container::flat_set<T>& set, const unsigned int file_version) void save(Archive& ar, const boost::container::flat_set<T>& set, const unsigned int file_version) {
{
ar << static_cast<u64>(set.size()); ar << static_cast<u64>(set.size());
for (auto& v : set) { for (auto& v : set) {
ar << v; ar << v;
@ -16,8 +15,7 @@ void save(Archive& ar, const boost::container::flat_set<T>& set, const unsigned
} }
template <class Archive, class T> template <class Archive, class T>
void load(Archive& ar, boost::container::flat_set<T>& set, const unsigned int file_version) void load(Archive& ar, boost::container::flat_set<T>& set, const unsigned int file_version) {
{
u64 count{}; u64 count{};
ar >> count; ar >> count;
set.clear(); set.clear();
@ -29,9 +27,8 @@ void load(Archive& ar, boost::container::flat_set<T>& set, const unsigned int fi
} }
template <class Archive, class T> template <class Archive, class T>
void serialize(Archive& ar, boost::container::flat_set<T>& set, const unsigned int file_version) void serialize(Archive& ar, boost::container::flat_set<T>& set, const unsigned int file_version) {
{
boost::serialization::split_free(ar, set, file_version); boost::serialization::split_free(ar, set, file_version);
} }
} } // namespace boost::serialization

View File

@ -7,15 +7,15 @@
#include <optional> #include <optional>
#include <boost/move/utility_core.hpp> #include <boost/move/utility_core.hpp>
#include <boost/serialization/detail/is_default_constructible.hpp>
#include <boost/serialization/detail/stack_constructor.hpp>
#include <boost/serialization/force_include.hpp>
#include <boost/serialization/item_version_type.hpp> #include <boost/serialization/item_version_type.hpp>
#include <boost/serialization/split_free.hpp>
#include <boost/serialization/level.hpp> #include <boost/serialization/level.hpp>
#include <boost/serialization/nvp.hpp> #include <boost/serialization/nvp.hpp>
#include <boost/serialization/split_free.hpp>
#include <boost/serialization/version.hpp> #include <boost/serialization/version.hpp>
#include <boost/type_traits/is_pointer.hpp> #include <boost/type_traits/is_pointer.hpp>
#include <boost/serialization/detail/stack_constructor.hpp>
#include <boost/serialization/detail/is_default_constructible.hpp>
#include <boost/serialization/force_include.hpp>
// function specializations must be defined in the appropriate // function specializations must be defined in the appropriate
// namespace - boost::serialization // namespace - boost::serialization
@ -23,10 +23,7 @@ namespace boost {
namespace serialization { namespace serialization {
template <class Archive, class T> template <class Archive, class T>
void save( void save(Archive& ar, const std::optional<T>& t, const unsigned int /*version*/
Archive & ar,
const std::optional< T > & t,
const unsigned int /*version*/
) { ) {
// It is an inherent limitation to the serialization of optional.hpp // It is an inherent limitation to the serialization of optional.hpp
// that the underlying type must be either a pointer or must have a // that the underlying type must be either a pointer or must have a
@ -34,10 +31,8 @@ void save(
// in the future, but for now, one will have to work around it. This can // in the future, but for now, one will have to work around it. This can
// be done by serialization the optional<T> as optional<T *> // be done by serialization the optional<T> as optional<T *>
#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
BOOST_STATIC_ASSERT( BOOST_STATIC_ASSERT(boost::serialization::detail::is_default_constructible<T>::value ||
boost::serialization::detail::is_default_constructible<T>::value boost::is_pointer<T>::value);
|| boost::is_pointer<T>::value
);
#endif #endif
const bool tflag = t.has_value(); const bool tflag = t.has_value();
ar << boost::serialization::make_nvp("initialized", tflag); ar << boost::serialization::make_nvp("initialized", tflag);
@ -47,11 +42,7 @@ void save(
} }
template <class Archive, class T> template <class Archive, class T>
void load( void load(Archive& ar, std::optional<T>& t, const unsigned int version) {
Archive & ar,
std::optional< T > & t,
const unsigned int version
){
bool tflag; bool tflag;
ar >> boost::serialization::make_nvp("initialized", tflag); ar >> boost::serialization::make_nvp("initialized", tflag);
if (!tflag) { if (!tflag) {
@ -61,9 +52,7 @@ void load(
if (0 == version) { if (0 == version) {
boost::serialization::item_version_type item_version(0); boost::serialization::item_version_type item_version(0);
boost::archive::library_version_type library_version( boost::archive::library_version_type library_version(ar.get_library_version());
ar.get_library_version()
);
if (boost::archive::library_version_type(3) < library_version) { if (boost::archive::library_version_type(3) < library_version) {
ar >> BOOST_SERIALIZATION_NVP(item_version); ar >> BOOST_SERIALIZATION_NVP(item_version);
} }
@ -74,11 +63,7 @@ void load(
} }
template <class Archive, class T> template <class Archive, class T>
void serialize( void serialize(Archive& ar, std::optional<T>& t, const unsigned int version) {
Archive & ar,
std::optional< T > & t,
const unsigned int version
){
boost::serialization::split_free(ar, t, version); boost::serialization::split_free(ar, t, version);
} }
@ -87,5 +72,5 @@ struct version<std::optional<T> > {
BOOST_STATIC_CONSTANT(int, value = 1); BOOST_STATIC_CONSTANT(int, value = 1);
}; };
} // serialization } // namespace serialization
} // boost } // namespace boost

View File

@ -162,20 +162,20 @@ private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void save(Archive& ar, const unsigned int file_version) const void save(Archive& ar, const unsigned int file_version) const {
{
s32 idx = first == UnlinkedTag() ? -1 : static_cast<s32>(first - &queues[0]); s32 idx = first == UnlinkedTag() ? -1 : static_cast<s32>(first - &queues[0]);
ar << idx; ar << idx;
for (auto i = 0; i < NUM_QUEUES; i++) { for (auto i = 0; i < NUM_QUEUES; i++) {
s32 idx1 = first == UnlinkedTag() ? -1 : static_cast<s32>(queues[i].next_nonempty - &queues[0]); s32 idx1 = first == UnlinkedTag()
? -1
: static_cast<s32>(queues[i].next_nonempty - &queues[0]);
ar << idx1; ar << idx1;
ar << queues[i].data; ar << queues[i].data;
} }
} }
template <class Archive> template <class Archive>
void load(Archive& ar, const unsigned int file_version) void load(Archive& ar, const unsigned int file_version) {
{
s32 idx; s32 idx;
ar >> idx; ar >> idx;
first = idx < 0 ? UnlinkedTag() : &queues[idx]; first = idx < 0 ? UnlinkedTag() : &queues[idx];

View File

@ -47,8 +47,7 @@ template <typename T>
class Vec2 { class Vec2 {
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive & ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& x; ar& x;
ar& y; ar& y;
} }
@ -202,8 +201,7 @@ template <typename T>
class Vec3 { class Vec3 {
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive & ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& x; ar& x;
ar& y; ar& y;
ar& z; ar& z;
@ -419,8 +417,7 @@ template <typename T>
class Vec4 { class Vec4 {
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive & ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& x; ar& x;
ar& y; ar& y;
ar& z; ar& z;

View File

@ -20,8 +20,7 @@ public:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void save(Archive& ar, const unsigned int file_version) const void save(Archive& ar, const unsigned int file_version) const {
{
for (auto i = 0; i < 16; i++) { for (auto i = 0; i < 16; i++) {
auto r = GetCpuRegister(i); auto r = GetCpuRegister(i);
ar << r; ar << r;
@ -39,8 +38,7 @@ public:
} }
template <class Archive> template <class Archive>
void load(Archive& ar, const unsigned int file_version) void load(Archive& ar, const unsigned int file_version) {
{
u32 r; u32 r;
for (auto i = 0; i < 16; i++) { for (auto i = 0; i < 16; i++) {
ar >> r; ar >> r;
@ -220,8 +218,7 @@ private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void save(Archive& ar, const unsigned int file_version) const void save(Archive& ar, const unsigned int file_version) const {
{
for (auto i = 0; i < 15; i++) { for (auto i = 0; i < 15; i++) {
auto r = GetReg(i); auto r = GetReg(i);
ar << r; ar << r;
@ -245,8 +242,7 @@ private:
} }
template <class Archive> template <class Archive>
void load(Archive& ar, const unsigned int file_version) void load(Archive& ar, const unsigned int file_version) {
{
u32 r; u32 r;
for (auto i = 0; i < 15; i++) { for (auto i = 0; i < 15; i++) {
ar >> r; ar >> r;

View File

@ -48,10 +48,14 @@ namespace Core {
/*static*/ System System::s_instance; /*static*/ System System::s_instance;
template <> template <>
Core::System& Global() { return System::GetInstance(); } Core::System& Global() {
return System::GetInstance();
}
template <> template <>
Kernel::KernelSystem& Global() { return System::GetInstance().Kernel(); } Kernel::KernelSystem& Global() {
return System::GetInstance().Kernel();
}
System::ResultStatus System::RunLoop(bool tight_loop) { System::ResultStatus System::RunLoop(bool tight_loop) {
status = ResultStatus::Success; status = ResultStatus::Success;
@ -209,8 +213,8 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, u32 system_mo
timing = std::make_unique<Timing>(); timing = std::make_unique<Timing>();
kernel = std::make_unique<Kernel::KernelSystem>(*memory, *timing, kernel = std::make_unique<Kernel::KernelSystem>(
[this] { PrepareReschedule(); }, system_mode); *memory, *timing, [this] { PrepareReschedule(); }, system_mode);
if (Settings::values.use_cpu_jit) { if (Settings::values.use_cpu_jit) {
#ifdef ARCHITECTURE_x86_64 #ifdef ARCHITECTURE_x86_64
@ -401,8 +405,7 @@ void System::Reset() {
} }
template <class Archive> template <class Archive>
void System::serialize(Archive & ar, const unsigned int file_version) void System::serialize(Archive& ar, const unsigned int file_version) {
{
ar&* cpu_core.get(); ar&* cpu_core.get();
ar&* service_manager.get(); ar&* service_manager.get();
ar& GPU::g_regs; ar& GPU::g_regs;
@ -412,8 +415,7 @@ void System::serialize(Archive & ar, const unsigned int file_version)
ar&* kernel.get(); ar&* kernel.get();
} }
void System::Save(std::ostream &stream) const void System::Save(std::ostream& stream) const {
{
{ {
oarchive oa{stream}; oarchive oa{stream};
oa&* this; oa&* this;
@ -421,8 +423,7 @@ void System::Save(std::ostream &stream) const
VideoCore::Save(stream); VideoCore::Save(stream);
} }
void System::Load(std::istream &stream) void System::Load(std::istream& stream) {
{
{ {
iarchive ia{stream}; iarchive ia{stream};
ia&* this; ia&* this;

View File

@ -6,12 +6,12 @@
#include "common/archives.h" #include "common/archives.h"
#include "common/common_types.h" #include "common/common_types.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/global.h"
#include "core/hle/kernel/address_arbiter.h" #include "core/hle/kernel/address_arbiter.h"
#include "core/hle/kernel/errors.h" #include "core/hle/kernel/errors.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/thread.h" #include "core/hle/kernel/thread.h"
#include "core/memory.h" #include "core/memory.h"
#include "core/global.h"
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////
// Kernel namespace // Kernel namespace

View File

@ -74,8 +74,7 @@ private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& boost::serialization::base_object<Object>(*this); ar& boost::serialization::base_object<Object>(*this);
ar& name; ar& name;
ar& waiting_threads; ar& waiting_threads;

View File

@ -4,6 +4,7 @@
#include "common/archives.h" #include "common/archives.h"
#include "common/assert.h" #include "common/assert.h"
#include "core/global.h"
#include "core/hle/kernel/client_port.h" #include "core/hle/kernel/client_port.h"
#include "core/hle/kernel/client_session.h" #include "core/hle/kernel/client_session.h"
#include "core/hle/kernel/errors.h" #include "core/hle/kernel/errors.h"
@ -11,7 +12,6 @@
#include "core/hle/kernel/object.h" #include "core/hle/kernel/object.h"
#include "core/hle/kernel/server_port.h" #include "core/hle/kernel/server_port.h"
#include "core/hle/kernel/server_session.h" #include "core/hle/kernel/server_session.h"
#include "core/global.h"
SERIALIZE_EXPORT_IMPL(Kernel::ClientPort) SERIALIZE_EXPORT_IMPL(Kernel::ClientPort)

View File

@ -61,12 +61,10 @@ private:
friend class KernelSystem; friend class KernelSystem;
private: private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& boost::serialization::base_object<Object>(*this); ar& boost::serialization::base_object<Object>(*this);
ar& server_port; ar& server_port;
ar& max_sessions; ar& max_sessions;

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "common/assert.h"
#include "common/archives.h" #include "common/archives.h"
#include "common/assert.h"
#include "core/hle/kernel/client_session.h" #include "core/hle/kernel/client_session.h"
#include "core/hle/kernel/errors.h" #include "core/hle/kernel/errors.h"
#include "core/hle/kernel/hle_ipc.h" #include "core/hle/kernel/hle_ipc.h"

View File

@ -53,8 +53,7 @@ public:
private: private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& boost::serialization::base_object<Object>(*this); ar& boost::serialization::base_object<Object>(*this);
ar& name; ar& name;
ar& parent; ar& parent;

View File

@ -60,8 +60,7 @@ private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
auto o_config_mem = boost::serialization::binary_object(&config_mem, sizeof(config_mem)); auto o_config_mem = boost::serialization::binary_object(&config_mem, sizeof(config_mem));
ar& o_config_mem; ar& o_config_mem;
} }

View File

@ -5,8 +5,8 @@
#include <algorithm> #include <algorithm>
#include <map> #include <map>
#include <vector> #include <vector>
#include "common/assert.h"
#include "common/archives.h" #include "common/archives.h"
#include "common/assert.h"
#include "core/hle/kernel/event.h" #include "core/hle/kernel/event.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/thread.h" #include "core/hle/kernel/thread.h"

View File

@ -53,8 +53,7 @@ private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& boost::serialization::base_object<WaitObject>(*this); ar& boost::serialization::base_object<WaitObject>(*this);
ar& reset_type; ar& reset_type;
ar& signaled; ar& signaled;

View File

@ -121,8 +121,7 @@ private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& objects; ar& objects;
ar& generations; ar& generations;
ar& next_generation; ar& next_generation;

View File

@ -11,10 +11,10 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <boost/container/small_vector.hpp> #include <boost/container/small_vector.hpp>
#include <boost/serialization/unique_ptr.hpp>
#include <boost/serialization/shared_ptr.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/assume_abstract.hpp> #include <boost/serialization/assume_abstract.hpp>
#include <boost/serialization/shared_ptr.hpp>
#include <boost/serialization/unique_ptr.hpp>
#include <boost/serialization/vector.hpp>
#include "common/common_types.h" #include "common/common_types.h"
#include "common/swap.h" #include "common/swap.h"
#include "core/hle/ipc.h" #include "core/hle/ipc.h"
@ -74,6 +74,7 @@ public:
/// in each service must inherit from this. /// in each service must inherit from this.
struct SessionDataBase { struct SessionDataBase {
virtual ~SessionDataBase() = default; virtual ~SessionDataBase() = default;
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) {} void serialize(Archive& ar, const unsigned int file_version) {}
@ -104,8 +105,7 @@ protected:
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& session; ar& session;
ar& data; ar& data;
} }
@ -117,8 +117,7 @@ protected:
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& connected_sessions; ar& connected_sessions;
} }
friend class boost::serialization::access; friend class boost::serialization::access;

View File

@ -30,13 +30,13 @@ struct MappedBufferContext {
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& permissions; ar& permissions;
ar& size; ar& size;
ar& source_address; ar& source_address;
ar& target_address; ar& target_address;
// TODO: Check whether we need these. If we do, add a field for the size and/or change to a 'vector' // TODO: Check whether we need these. If we do, add a field for the size and/or change to a
// 'vector'
// ar & buffer; // ar & buffer;
// ar & reserve_buffer; // ar & reserve_buffer;
} }

View File

@ -104,8 +104,7 @@ void KernelSystem::AddNamedPort(std::string name, std::shared_ptr<ClientPort> po
} }
template <class Archive> template <class Archive>
void KernelSystem::serialize(Archive& ar, const unsigned int file_version) void KernelSystem::serialize(Archive& ar, const unsigned int file_version) {
{
ar& memory_regions; ar& memory_regions;
ar& named_ports; ar& named_ports;
ar&* current_cpu.get(); ar&* current_cpu.get();

View File

@ -7,8 +7,8 @@
#include <optional> #include <optional>
#include <boost/icl/interval_set.hpp> #include <boost/icl/interval_set.hpp>
#include <boost/serialization/set.hpp> #include <boost/serialization/set.hpp>
#include "common/serialization/boost_discrete_interval.hpp"
#include "common/common_types.h" #include "common/common_types.h"
#include "common/serialization/boost_discrete_interval.hpp"
namespace Kernel { namespace Kernel {
@ -66,8 +66,7 @@ struct MemoryRegionInfo {
private: private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& base; ar& base;
ar& size; ar& size;
ar& used; ar& used;

View File

@ -7,12 +7,12 @@
#include "common/archives.h" #include "common/archives.h"
#include "common/assert.h" #include "common/assert.h"
#include "core/core.h" #include "core/core.h"
#include "core/global.h"
#include "core/hle/kernel/errors.h" #include "core/hle/kernel/errors.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/mutex.h" #include "core/hle/kernel/mutex.h"
#include "core/hle/kernel/object.h" #include "core/hle/kernel/object.h"
#include "core/hle/kernel/thread.h" #include "core/hle/kernel/thread.h"
#include "core/global.h"
SERIALIZE_EXPORT_IMPL(Kernel::Mutex) SERIALIZE_EXPORT_IMPL(Kernel::Mutex)

View File

@ -62,8 +62,7 @@ private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& boost::serialization::base_object<WaitObject>(*this); ar& boost::serialization::base_object<WaitObject>(*this);
ar& lock_count; ar& lock_count;
ar& priority; ar& priority;

View File

@ -10,10 +10,10 @@
#include <boost/serialization/access.hpp> #include <boost/serialization/access.hpp>
#include <boost/serialization/assume_abstract.hpp> #include <boost/serialization/assume_abstract.hpp>
#include <boost/serialization/export.hpp> #include <boost/serialization/export.hpp>
#include "common/serialization/atomic.h"
#include "common/common_types.h" #include "common/common_types.h"
#include "core/hle/kernel/kernel.h" #include "common/serialization/atomic.h"
#include "core/global.h" #include "core/global.h"
#include "core/hle/kernel/kernel.h"
namespace Kernel { namespace Kernel {
@ -72,8 +72,7 @@ private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& object_id; ar& object_id;
} }
}; };
@ -105,8 +104,7 @@ BOOST_SERIALIZATION_ASSUME_ABSTRACT(Kernel::Object)
#define CONSTRUCT_KERNEL_OBJECT(T) \ #define CONSTRUCT_KERNEL_OBJECT(T) \
namespace boost::serialization { \ namespace boost::serialization { \
template <class Archive> \ template <class Archive> \
inline void load_construct_data( \ inline void load_construct_data(Archive& ar, T* t, const unsigned int file_version) { \
Archive & ar, T * t, const unsigned int file_version \
){ \
::new (t) T(Core::Global<Kernel::KernelSystem>()); \ ::new (t) T(Core::Global<Kernel::KernelSystem>()); \
}} } \
}

View File

@ -11,6 +11,7 @@
#include "common/common_funcs.h" #include "common/common_funcs.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "common/serialization/boost_vector.hpp" #include "common/serialization/boost_vector.hpp"
#include "core/global.h"
#include "core/hle/kernel/errors.h" #include "core/hle/kernel/errors.h"
#include "core/hle/kernel/memory.h" #include "core/hle/kernel/memory.h"
#include "core/hle/kernel/process.h" #include "core/hle/kernel/process.h"
@ -18,7 +19,6 @@
#include "core/hle/kernel/thread.h" #include "core/hle/kernel/thread.h"
#include "core/hle/kernel/vm_manager.h" #include "core/hle/kernel/vm_manager.h"
#include "core/memory.h" #include "core/memory.h"
#include "core/global.h"
SERIALIZE_EXPORT_IMPL(Kernel::Process) SERIALIZE_EXPORT_IMPL(Kernel::Process)
SERIALIZE_EXPORT_IMPL(Kernel::CodeSet) SERIALIZE_EXPORT_IMPL(Kernel::CodeSet)
@ -26,15 +26,16 @@ SERIALIZE_EXPORT_IMPL(Kernel::CodeSet)
namespace Kernel { namespace Kernel {
template <class Archive> template <class Archive>
void Process::serialize(Archive& ar, const unsigned int file_version) void Process::serialize(Archive& ar, const unsigned int file_version) {
{
ar& boost::serialization::base_object<Object>(*this); ar& boost::serialization::base_object<Object>(*this);
ar& handle_table; ar& handle_table;
ar& codeset; ar& codeset;
ar& resource_limit; ar& resource_limit;
ar& svc_access_mask; ar& svc_access_mask;
ar& handle_table_size; ar& handle_table_size;
ar & (boost::container::vector<AddressMapping, boost::container::dtl::static_storage_allocator<AddressMapping, 8> >&)address_mappings; ar&(boost::container::vector<
AddressMapping, boost::container::dtl::static_storage_allocator<AddressMapping, 8>>&)
address_mappings;
ar& flags.raw; ar& flags.raw;
ar& kernel_version; ar& kernel_version;
ar& ideal_processor; ar& ideal_processor;

View File

@ -11,8 +11,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <boost/container/static_vector.hpp> #include <boost/container/static_vector.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/base_object.hpp> #include <boost/serialization/base_object.hpp>
#include <boost/serialization/vector.hpp>
#include "common/bit_field.h" #include "common/bit_field.h"
#include "common/common_types.h" #include "common/common_types.h"
#include "core/hle/kernel/handle_table.h" #include "core/hle/kernel/handle_table.h"
@ -31,8 +31,7 @@ struct AddressMapping {
private: private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& address; ar& address;
ar& size; ar& size;
ar& read_only; ar& read_only;
@ -76,8 +75,7 @@ public:
private: private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& offset; ar& offset;
ar& addr; ar& addr;
ar& size; ar& size;
@ -133,8 +131,7 @@ public:
private: private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& boost::serialization::base_object<Object>(*this); ar& boost::serialization::base_object<Object>(*this);
// TODO: memory reference // TODO: memory reference
ar& segments; ar& segments;

View File

@ -116,10 +116,10 @@ public:
private: private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& boost::serialization::base_object<Object>(*this); ar& boost::serialization::base_object<Object>(*this);
// NB most of these aren't used at all currently, but we're adding them here for forwards compatibility // NB most of these aren't used at all currently, but we're adding them here for forwards
// compatibility
ar& name; ar& name;
ar& max_priority; ar& max_priority;
ar& max_commit; ar& max_commit;
@ -160,8 +160,7 @@ private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& resource_limits; ar& resource_limits;
} }
}; };

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "common/assert.h"
#include "common/archives.h" #include "common/archives.h"
#include "common/assert.h"
#include "core/hle/kernel/errors.h" #include "core/hle/kernel/errors.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/semaphore.h" #include "core/hle/kernel/semaphore.h"

View File

@ -5,8 +5,8 @@
#pragma once #pragma once
#include <string> #include <string>
#include <queue>
#include <boost/serialization/export.hpp> #include <boost/serialization/export.hpp>
#include <queue>
#include "common/common_types.h" #include "common/common_types.h"
#include "core/hle/kernel/object.h" #include "core/hle/kernel/object.h"
#include "core/hle/kernel/wait_object.h" #include "core/hle/kernel/wait_object.h"
@ -48,8 +48,7 @@ public:
private: private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& boost::serialization::base_object<WaitObject>(*this); ar& boost::serialization::base_object<WaitObject>(*this);
ar& max_count; ar& max_count;
ar& available_count; ar& available_count;

View File

@ -7,11 +7,11 @@
#include "common/assert.h" #include "common/assert.h"
#include "core/hle/kernel/client_port.h" #include "core/hle/kernel/client_port.h"
#include "core/hle/kernel/errors.h" #include "core/hle/kernel/errors.h"
#include "core/hle/kernel/hle_ipc.h"
#include "core/hle/kernel/object.h" #include "core/hle/kernel/object.h"
#include "core/hle/kernel/server_port.h" #include "core/hle/kernel/server_port.h"
#include "core/hle/kernel/server_session.h" #include "core/hle/kernel/server_session.h"
#include "core/hle/kernel/thread.h" #include "core/hle/kernel/thread.h"
#include "core/hle/kernel/hle_ipc.h"
SERIALIZE_EXPORT_IMPL(Kernel::ServerPort) SERIALIZE_EXPORT_IMPL(Kernel::ServerPort)
@ -53,8 +53,7 @@ KernelSystem::PortPair KernelSystem::CreatePortPair(u32 max_sessions, std::strin
} }
template <class Archive> template <class Archive>
void ServerPort::serialize(Archive& ar, const unsigned int file_version) void ServerPort::serialize(Archive& ar, const unsigned int file_version) {
{
ar& boost::serialization::base_object<WaitObject>(*this); ar& boost::serialization::base_object<WaitObject>(*this);
ar& name; ar& name;
ar& pending_sessions; ar& pending_sessions;

View File

@ -4,13 +4,13 @@
#include <tuple> #include <tuple>
#include "common/archives.h" #include "common/archives.h"
#include "core/global.h"
#include "core/hle/kernel/client_port.h" #include "core/hle/kernel/client_port.h"
#include "core/hle/kernel/client_session.h" #include "core/hle/kernel/client_session.h"
#include "core/hle/kernel/hle_ipc.h" #include "core/hle/kernel/hle_ipc.h"
#include "core/hle/kernel/server_session.h" #include "core/hle/kernel/server_session.h"
#include "core/hle/kernel/session.h" #include "core/hle/kernel/session.h"
#include "core/hle/kernel/thread.h" #include "core/hle/kernel/thread.h"
#include "core/global.h"
SERIALIZE_EXPORT_IMPL(Kernel::ServerSession) SERIALIZE_EXPORT_IMPL(Kernel::ServerSession)

View File

@ -110,8 +110,7 @@ private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& boost::serialization::base_object<Object>(*this); ar& boost::serialization::base_object<Object>(*this);
ar& name; ar& name;
ar& parent; ar& parent;

View File

@ -4,19 +4,18 @@
#include <boost/serialization/shared_ptr.hpp> #include <boost/serialization/shared_ptr.hpp>
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/kernel/session.h"
#include "core/hle/kernel/client_session.h"
#include "core/hle/kernel/server_session.h"
#include "core/hle/kernel/client_port.h" #include "core/hle/kernel/client_port.h"
#include "core/hle/kernel/client_session.h"
#include "core/hle/kernel/hle_ipc.h" #include "core/hle/kernel/hle_ipc.h"
#include "core/hle/kernel/server_session.h"
#include "core/hle/kernel/session.h"
SERIALIZE_IMPL(Kernel::Session) SERIALIZE_IMPL(Kernel::Session)
namespace Kernel { namespace Kernel {
template <class Archive> template <class Archive>
void Session::serialize(Archive& ar, const unsigned int file_version) void Session::serialize(Archive& ar, const unsigned int file_version) {
{
ar& client; ar& client;
ar& server; ar& server;
ar& port; ar& port;

View File

@ -5,11 +5,11 @@
#include <cstring> #include <cstring>
#include "common/archives.h" #include "common/archives.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/global.h"
#include "core/hle/kernel/errors.h" #include "core/hle/kernel/errors.h"
#include "core/hle/kernel/memory.h" #include "core/hle/kernel/memory.h"
#include "core/hle/kernel/shared_memory.h" #include "core/hle/kernel/shared_memory.h"
#include "core/memory.h" #include "core/memory.h"
#include "core/global.h"
SERIALIZE_EXPORT_IMPL(Kernel::SharedMemory) SERIALIZE_EXPORT_IMPL(Kernel::SharedMemory)

View File

@ -107,8 +107,7 @@ private:
KernelSystem& kernel; KernelSystem& kernel;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& linear_heap_phys_offset; ar& linear_heap_phys_offset;
// TODO: backing blocks u8* (this is always FCRAM I think) // TODO: backing blocks u8* (this is always FCRAM I think)
ar& size; ar& size;

View File

@ -108,8 +108,7 @@ private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
auto o_shared_page = boost::serialization::binary_object(&shared_page, sizeof(shared_page)); auto o_shared_page = boost::serialization::binary_object(&shared_page, sizeof(shared_page));
ar& o_shared_page; ar& o_shared_page;
} }

View File

@ -15,6 +15,7 @@
#include "core/arm/arm_interface.h" #include "core/arm/arm_interface.h"
#include "core/arm/skyeye_common/armstate.h" #include "core/arm/skyeye_common/armstate.h"
#include "core/core.h" #include "core/core.h"
#include "core/global.h"
#include "core/hle/kernel/errors.h" #include "core/hle/kernel/errors.h"
#include "core/hle/kernel/handle_table.h" #include "core/hle/kernel/handle_table.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
@ -24,15 +25,13 @@
#include "core/hle/kernel/thread.h" #include "core/hle/kernel/thread.h"
#include "core/hle/result.h" #include "core/hle/result.h"
#include "core/memory.h" #include "core/memory.h"
#include "core/global.h"
SERIALIZE_EXPORT_IMPL(Kernel::Thread) SERIALIZE_EXPORT_IMPL(Kernel::Thread)
namespace Kernel { namespace Kernel {
template <class Archive> template <class Archive>
void Thread::serialize(Archive& ar, const unsigned int file_version) void Thread::serialize(Archive& ar, const unsigned int file_version) {
{
ar&* context.get(); ar&* context.get();
ar& thread_id; ar& thread_id;
ar& status; ar& status;

View File

@ -9,10 +9,10 @@
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include <boost/container/flat_set.hpp> #include <boost/container/flat_set.hpp>
#include <boost/serialization/export.hpp>
#include <boost/serialization/shared_ptr.hpp> #include <boost/serialization/shared_ptr.hpp>
#include <boost/serialization/unordered_map.hpp> #include <boost/serialization/unordered_map.hpp>
#include <boost/serialization/vector.hpp> #include <boost/serialization/vector.hpp>
#include <boost/serialization/export.hpp>
#include "common/common_types.h" #include "common/common_types.h"
#include "common/thread_queue_list.h" #include "common/thread_queue_list.h"
#include "core/arm/arm_interface.h" #include "core/arm/arm_interface.h"
@ -152,8 +152,7 @@ private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& next_thread_id; ar& next_thread_id;
ar& current_thread; ar& current_thread;
ar& ready_queue; ar& ready_queue;

View File

@ -8,11 +8,11 @@
#include "common/assert.h" #include "common/assert.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/core.h" #include "core/core.h"
#include "core/global.h"
#include "core/hle/kernel/handle_table.h" #include "core/hle/kernel/handle_table.h"
#include "core/hle/kernel/object.h" #include "core/hle/kernel/object.h"
#include "core/hle/kernel/thread.h" #include "core/hle/kernel/thread.h"
#include "core/hle/kernel/timer.h" #include "core/hle/kernel/timer.h"
#include "core/global.h"
SERIALIZE_EXPORT_IMPL(Kernel::Timer) SERIALIZE_EXPORT_IMPL(Kernel::Timer)

View File

@ -37,8 +37,7 @@ private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& next_timer_callback_id; ar& next_timer_callback_id;
ar& timer_callback_table; ar& timer_callback_table;
} }
@ -115,8 +114,7 @@ private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& reset_type; ar& reset_type;
ar& initial_delay; ar& initial_delay;
ar& interval_delay; ar& interval_delay;

View File

@ -86,8 +86,7 @@ struct VirtualMemoryArea {
private: private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& base; ar& base;
ar& size; ar& size;
ar& type; ar& type;
@ -213,8 +212,7 @@ public:
private: private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void save(Archive& ar, const unsigned int file_version) const void save(Archive& ar, const unsigned int file_version) const {
{
ar& vma_map; ar& vma_map;
for (int i = 0; i < page_table.pointers.size(); i++) { for (int i = 0; i < page_table.pointers.size(); i++) {
ar << memory.GetFCRAMOffset(page_table.pointers[i]); ar << memory.GetFCRAMOffset(page_table.pointers[i]);
@ -224,8 +222,7 @@ private:
} }
template <class Archive> template <class Archive>
void load(Archive& ar, const unsigned int file_version) void load(Archive& ar, const unsigned int file_version) {
{
ar& vma_map; ar& vma_map;
for (int i = 0; i < page_table.pointers.size(); i++) { for (int i = 0; i < page_table.pointers.size(); i++) {
u32 offset{}; u32 offset{};

View File

@ -69,8 +69,7 @@ private:
private: private:
friend class boost::serialization::access; friend class boost::serialization::access;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) void serialize(Archive& ar, const unsigned int file_version) {
{
ar& boost::serialization::base_object<Object>(*this); ar& boost::serialization::base_object<Object>(*this);
ar& waiting_threads; ar& waiting_threads;
// NB: hle_notifier *not* serialized since it's a callback! // NB: hle_notifier *not* serialized since it's a callback!

View File

@ -3,9 +3,9 @@
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include <vector> #include <vector>
#include "common/archives.h"
#include "common/common_types.h" #include "common/common_types.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "common/archives.h"
#include "core/core.h" #include "core/core.h"
#include "core/hle/ipc.h" #include "core/hle/ipc.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
@ -181,8 +181,7 @@ void InstallInterfaces(Core::System& system) {
} }
template <class Archive> template <class Archive>
void Module::serialize(Archive& ar, const unsigned int) void Module::serialize(Archive& ar, const unsigned int) {
{
ar& ac_connected; ar& ac_connected;
ar& close_event; ar& close_event;
ar& connect_event; ar& connect_event;

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/ac/ac_i.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/ac/ac_i.h"
namespace Service::AC { namespace Service::AC {

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/ac/ac_u.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/ac/ac_u.h"
namespace Service::AC { namespace Service::AC {

View File

@ -23,6 +23,7 @@ public:
protected: protected:
std::shared_ptr<Module> act; std::shared_ptr<Module> act;
}; };
private: private:
template <class Archive> template <class Archive>
inline void serialize(Archive& ar, const unsigned int file_version) {} inline void serialize(Archive& ar, const unsigned int file_version) {}

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/act/act_a.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/act/act_a.h"
namespace Service::ACT { namespace Service::ACT {

View File

@ -11,6 +11,7 @@ namespace Service::ACT {
class ACT_A final : public Module::Interface { class ACT_A final : public Module::Interface {
public: public:
explicit ACT_A(std::shared_ptr<Module> act); explicit ACT_A(std::shared_ptr<Module> act);
private: private:
SERVICE_SERIALIZATION(ACT_A, act, Module) SERVICE_SERIALIZATION(ACT_A, act, Module)
}; };

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/act/act_u.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/act/act_u.h"
namespace Service::ACT { namespace Service::ACT {

View File

@ -11,6 +11,7 @@ namespace Service::ACT {
class ACT_U final : public Module::Interface { class ACT_U final : public Module::Interface {
public: public:
explicit ACT_U(std::shared_ptr<Module> act); explicit ACT_U(std::shared_ptr<Module> act);
private: private:
SERVICE_SERIALIZATION(ACT_U, act, Module) SERVICE_SERIALIZATION(ACT_U, act, Module)
}; };

View File

@ -10,15 +10,15 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <boost/serialization/array.hpp> #include <boost/serialization/array.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/shared_ptr.hpp> #include <boost/serialization/shared_ptr.hpp>
#include <boost/serialization/vector.hpp>
#include "common/common_types.h" #include "common/common_types.h"
#include "core/file_sys/cia_container.h" #include "core/file_sys/cia_container.h"
#include "core/file_sys/file_backend.h" #include "core/file_sys/file_backend.h"
#include "core/global.h"
#include "core/hle/kernel/mutex.h" #include "core/hle/kernel/mutex.h"
#include "core/hle/result.h" #include "core/hle/result.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"
#include "core/global.h"
namespace Core { namespace Core {
class System; class System;
@ -585,8 +585,7 @@ private:
std::shared_ptr<Kernel::Mutex> system_updater_mutex; std::shared_ptr<Kernel::Mutex> system_updater_mutex;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& cia_installing; ar& cia_installing;
ar& am_title_list; ar& am_title_list;
ar& system_updater_mutex; ar& system_updater_mutex;
@ -600,8 +599,7 @@ void InstallInterfaces(Core::System& system);
namespace boost::serialization { namespace boost::serialization {
template <class Archive> template <class Archive>
inline void load_construct_data(Archive& ar, Service::AM::Module* t, const unsigned int) inline void load_construct_data(Archive& ar, Service::AM::Module* t, const unsigned int) {
{
::new (t) Service::AM::Module(Core::Global<Kernel::KernelSystem>()); ::new (t) Service::AM::Module(Core::Global<Kernel::KernelSystem>());
} }
} } // namespace boost::serialization

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/am/am_app.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/am/am_app.h"
namespace Service::AM { namespace Service::AM {

View File

@ -11,6 +11,7 @@ namespace Service::AM {
class AM_APP final : public Module::Interface { class AM_APP final : public Module::Interface {
public: public:
explicit AM_APP(std::shared_ptr<Module> am); explicit AM_APP(std::shared_ptr<Module> am);
private: private:
SERVICE_SERIALIZATION(AM_APP, am, Module) SERVICE_SERIALIZATION(AM_APP, am, Module)
}; };

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/am/am_net.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/am/am_net.h"
namespace Service::AM { namespace Service::AM {

View File

@ -11,6 +11,7 @@ namespace Service::AM {
class AM_NET final : public Module::Interface { class AM_NET final : public Module::Interface {
public: public:
explicit AM_NET(std::shared_ptr<Module> am); explicit AM_NET(std::shared_ptr<Module> am);
private: private:
SERVICE_SERIALIZATION(AM_NET, am, Module) SERVICE_SERIALIZATION(AM_NET, am, Module)
}; };

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/am/am_sys.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/am/am_sys.h"
namespace Service::AM { namespace Service::AM {

View File

@ -11,6 +11,7 @@ namespace Service::AM {
class AM_SYS final : public Module::Interface { class AM_SYS final : public Module::Interface {
public: public:
explicit AM_SYS(std::shared_ptr<Module> am); explicit AM_SYS(std::shared_ptr<Module> am);
private: private:
SERVICE_SERIALIZATION(AM_SYS, am, Module) SERVICE_SERIALIZATION(AM_SYS, am, Module)
}; };

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/am/am_u.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/am/am_u.h"
namespace Service::AM { namespace Service::AM {

View File

@ -11,6 +11,7 @@ namespace Service::AM {
class AM_U final : public Module::Interface { class AM_U final : public Module::Interface {
public: public:
explicit AM_U(std::shared_ptr<Module> am); explicit AM_U(std::shared_ptr<Module> am);
private: private:
SERVICE_SERIALIZATION(AM_U, am, Module) SERVICE_SERIALIZATION(AM_U, am, Module)
}; };

View File

@ -10,10 +10,10 @@
#include <vector> #include <vector>
#include <boost/serialization/array.hpp> #include <boost/serialization/array.hpp>
#include "common/serialization/optional.h" #include "common/serialization/optional.h"
#include "core/global.h"
#include "core/hle/kernel/event.h" #include "core/hle/kernel/event.h"
#include "core/hle/result.h" #include "core/hle/result.h"
#include "core/hle/service/fs/archive.h" #include "core/hle/service/fs/archive.h"
#include "core/global.h"
namespace Core { namespace Core {
class System; class System;
@ -90,8 +90,7 @@ struct MessageParameter {
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& sender_id; ar& sender_id;
ar& destination_id; ar& destination_id;
ar& signal; ar& signal;
@ -179,8 +178,7 @@ public:
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& next_title_id; ar& next_title_id;
ar& next_media_type; ar& next_media_type;
ar& current_title_id; ar& current_title_id;
@ -228,8 +226,7 @@ private:
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& applet_id; ar& applet_id;
ar& slot; ar& slot;
ar& title_id; ar& title_id;
@ -260,8 +257,7 @@ private:
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& next_parameter; ar& next_parameter;
ar& app_jump_parameters; ar& app_jump_parameters;
ar& applet_slots; ar& applet_slots;
@ -274,8 +270,7 @@ private:
namespace boost::serialization { namespace boost::serialization {
template <class Archive> template <class Archive>
inline void load_construct_data(Archive& ar, Service::APT::AppletManager* t, const unsigned int) inline void load_construct_data(Archive& ar, Service::APT::AppletManager* t, const unsigned int) {
{
::new (t) Service::APT::AppletManager(Core::Global<Core::System>()); ::new (t) Service::APT::AppletManager(Core::Global<Core::System>());
} }
} } // namespace boost::serialization

View File

@ -2,10 +2,10 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "common/archives.h"
#include "common/common_paths.h" #include "common/common_paths.h"
#include "common/file_util.h" #include "common/file_util.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "common/archives.h"
#include "core/core.h" #include "core/core.h"
#include "core/file_sys/archive_ncch.h" #include "core/file_sys/archive_ncch.h"
#include "core/file_sys/file_backend.h" #include "core/file_sys/file_backend.h"
@ -32,8 +32,7 @@ SERVICE_CONSTRUCT_IMPL(Service::APT::Module)
namespace Service::APT { namespace Service::APT {
template <class Archive> template <class Archive>
void Module::serialize(Archive& ar, const unsigned int) void Module::serialize(Archive& ar, const unsigned int) {
{
ar& shared_font_mem; ar& shared_font_mem;
ar& shared_font_loaded; ar& shared_font_loaded;
ar& shared_font_relocated; ar& shared_font_relocated;

View File

@ -12,10 +12,9 @@
#include "common/common_funcs.h" #include "common/common_funcs.h"
#include "common/common_types.h" #include "common/common_types.h"
#include "common/swap.h" #include "common/swap.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/service/apt/applet_manager.h"
#include "core/hle/service/service.h"
#include "core/global.h" #include "core/global.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/service/service.h"
namespace Core { namespace Core {
class System; class System;
@ -612,8 +611,7 @@ public:
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& application_reset_prepared; ar& application_reset_prepared;
} }
friend class boost::serialization::access; friend class boost::serialization::access;

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/apt/apt_a.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/apt/apt_a.h"
namespace Service::APT { namespace Service::APT {

View File

@ -11,6 +11,7 @@ namespace Service::APT {
class APT_A final : public Module::APTInterface { class APT_A final : public Module::APTInterface {
public: public:
explicit APT_A(std::shared_ptr<Module> apt); explicit APT_A(std::shared_ptr<Module> apt);
private: private:
SERVICE_SERIALIZATION(APT_A, apt, Module) SERVICE_SERIALIZATION(APT_A, apt, Module)
}; };

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/apt/apt_s.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/apt/apt_s.h"
namespace Service::APT { namespace Service::APT {

View File

@ -18,6 +18,7 @@ namespace Service::APT {
class APT_S final : public Module::APTInterface { class APT_S final : public Module::APTInterface {
public: public:
explicit APT_S(std::shared_ptr<Module> apt); explicit APT_S(std::shared_ptr<Module> apt);
private: private:
SERVICE_SERIALIZATION(APT_S, apt, Module) SERVICE_SERIALIZATION(APT_S, apt, Module)
}; };

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/apt/apt_u.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/apt/apt_u.h"
namespace Service::APT { namespace Service::APT {

View File

@ -18,6 +18,7 @@ namespace Service::APT {
class APT_U final : public Module::APTInterface { class APT_U final : public Module::APTInterface {
public: public:
explicit APT_U(std::shared_ptr<Module> apt); explicit APT_U(std::shared_ptr<Module> apt);
private: private:
SERVICE_SERIALIZATION(APT_U, apt, Module) SERVICE_SERIALIZATION(APT_U, apt, Module)
}; };

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/apt/ns_s.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/apt/ns_s.h"
namespace Service::NS { namespace Service::NS {

View File

@ -14,6 +14,7 @@ namespace Service::NS {
class NS_S final : public Service::APT::Module::NSInterface { class NS_S final : public Service::APT::Module::NSInterface {
public: public:
explicit NS_S(std::shared_ptr<Service::APT::Module> apt); explicit NS_S(std::shared_ptr<Service::APT::Module> apt);
private: private:
SERVICE_SERIALIZATION(NS_S, apt, Service::APT::Module) SERVICE_SERIALIZATION(NS_S, apt, Service::APT::Module)
}; };

View File

@ -6,9 +6,9 @@
#include <memory> #include <memory>
#include <boost/serialization/shared_ptr.hpp> #include <boost/serialization/shared_ptr.hpp>
#include "core/global.h"
#include "core/hle/kernel/event.h" #include "core/hle/kernel/event.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"
#include "core/global.h"
namespace Core { namespace Core {
class System; class System;
@ -964,8 +964,7 @@ public:
u8 output_flag; u8 output_flag;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& new_arrival_flag; ar& new_arrival_flag;
ar& ns_data_new_flag; ar& ns_data_new_flag;
ar& ns_data_new_flag_privileged; ar& ns_data_new_flag_privileged;
@ -978,8 +977,7 @@ private:
std::shared_ptr<Kernel::Event> task_finish_event; std::shared_ptr<Kernel::Event> task_finish_event;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& task_finish_event; ar& task_finish_event;
} }
friend class boost::serialization::access; friend class boost::serialization::access;
@ -991,8 +989,7 @@ void InstallInterfaces(Core::System& system);
namespace boost::serialization { namespace boost::serialization {
template <class Archive> template <class Archive>
inline void load_construct_data(Archive& ar, Service::BOSS::Module* t, const unsigned int) inline void load_construct_data(Archive& ar, Service::BOSS::Module* t, const unsigned int) {
{
::new (t) Service::BOSS::Module(Core::Global<Core::System>()); ::new (t) Service::BOSS::Module(Core::Global<Core::System>());
} }
} } // namespace boost::serialization

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/boss/boss_p.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/boss/boss_p.h"
namespace Service::BOSS { namespace Service::BOSS {

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/boss/boss_u.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/boss/boss_u.h"
namespace Service::BOSS { namespace Service::BOSS {

View File

@ -24,8 +24,7 @@
namespace Service::CAM { namespace Service::CAM {
template <class Archive> template <class Archive>
void Module::serialize(Archive& ar, const unsigned int) void Module::serialize(Archive& ar, const unsigned int) {
{
ar& cameras; ar& cameras;
ar& ports; ar& ports;
ar& is_camera_reload_pending; ar& is_camera_reload_pending;

View File

@ -10,9 +10,9 @@
#include <vector> #include <vector>
#include "common/common_types.h" #include "common/common_types.h"
#include "common/swap.h" #include "common/swap.h"
#include "core/global.h"
#include "core/hle/result.h" #include "core/hle/result.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"
#include "core/global.h"
namespace Core { namespace Core {
class System; class System;
@ -183,8 +183,7 @@ struct Resolution {
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& width; ar& width;
ar& height; ar& height;
ar& crop_x0; ar& crop_x0;
@ -755,8 +754,7 @@ private:
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& flip; ar& flip;
ar& effect; ar& effect;
ar& format; ar& format;
@ -773,8 +771,7 @@ private:
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& impl; ar& impl;
ar& contexts; ar& contexts;
ar& current_context; ar& current_context;
@ -818,8 +815,7 @@ private:
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& camera_id; ar& camera_id;
ar& is_active; ar& is_active;
ar& is_pending_receiving; ar& is_pending_receiving;
@ -865,8 +861,7 @@ void InstallInterfaces(Core::System& system);
namespace boost::serialization { namespace boost::serialization {
template <class Archive> template <class Archive>
inline void load_construct_data(Archive& ar, Service::CAM::Module* t, const unsigned int) inline void load_construct_data(Archive& ar, Service::CAM::Module* t, const unsigned int) {
{
::new (t) Service::CAM::Module(Core::Global<Core::System>()); ::new (t) Service::CAM::Module(Core::Global<Core::System>());
} }
} } // namespace boost::serialization

View File

@ -2,9 +2,9 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "common/archives.h"
#include "core/hle/service/cam/cam.h" #include "core/hle/service/cam/cam.h"
#include "core/hle/service/cam/cam_c.h" #include "core/hle/service/cam/cam_c.h"
#include "common/archives.h"
namespace Service::CAM { namespace Service::CAM {

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/cam/cam_q.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/cam/cam_q.h"
namespace Service::CAM { namespace Service::CAM {

View File

@ -11,10 +11,10 @@ namespace Service::CAM {
class CAM_Q : public ServiceFramework<CAM_Q> { class CAM_Q : public ServiceFramework<CAM_Q> {
public: public:
CAM_Q(); CAM_Q();
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this); ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
} }
friend class boost::serialization::access; friend class boost::serialization::access;

View File

@ -2,9 +2,9 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "common/archives.h"
#include "core/hle/service/cam/cam.h" #include "core/hle/service/cam/cam.h"
#include "core/hle/service/cam/cam_s.h" #include "core/hle/service/cam/cam_s.h"
#include "common/archives.h"
namespace Service::CAM { namespace Service::CAM {

View File

@ -2,9 +2,9 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "common/archives.h"
#include "core/hle/service/cam/cam.h" #include "core/hle/service/cam/cam.h"
#include "core/hle/service/cam/cam_u.h" #include "core/hle/service/cam/cam_u.h"
#include "common/archives.h"
namespace Service::CAM { namespace Service::CAM {

View File

@ -38,8 +38,7 @@ struct AdpcmState {
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& predictor; ar& predictor;
ar& step_index; ar& step_index;
} }
@ -66,8 +65,7 @@ struct Channel {
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& block1_address; ar& block1_address;
ar& block2_address; ar& block2_address;
ar& block1_size; ar& block1_size;
@ -258,8 +256,7 @@ private:
u32 acquired_channel_mask = 0; u32 acquired_channel_mask = 0;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this); ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
ar& mutex; ar& mutex;
ar& shared_memory; ar& shared_memory;

View File

@ -2,9 +2,9 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "common/archives.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/service/dlp/dlp_clnt.h" #include "core/hle/service/dlp/dlp_clnt.h"
#include "common/archives.h"
SERIALIZE_EXPORT_IMPL(Service::DLP::DLP_CLNT) SERIALIZE_EXPORT_IMPL(Service::DLP::DLP_CLNT)

View File

@ -12,10 +12,10 @@ class DLP_CLNT final : public ServiceFramework<DLP_CLNT> {
public: public:
DLP_CLNT(); DLP_CLNT();
~DLP_CLNT() = default; ~DLP_CLNT() = default;
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this); ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
} }
friend class boost::serialization::access; friend class boost::serialization::access;

View File

@ -2,9 +2,9 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "common/archives.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/service/dlp/dlp_fkcl.h" #include "core/hle/service/dlp/dlp_fkcl.h"
#include "common/archives.h"
SERIALIZE_EXPORT_IMPL(Service::DLP::DLP_FKCL) SERIALIZE_EXPORT_IMPL(Service::DLP::DLP_FKCL)

View File

@ -12,10 +12,10 @@ class DLP_FKCL final : public ServiceFramework<DLP_FKCL> {
public: public:
DLP_FKCL(); DLP_FKCL();
~DLP_FKCL() = default; ~DLP_FKCL() = default;
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this); ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
} }
friend class boost::serialization::access; friend class boost::serialization::access;

View File

@ -2,12 +2,12 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "common/archives.h"
#include "common/common_types.h" #include "common/common_types.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/result.h" #include "core/hle/result.h"
#include "core/hle/service/dlp/dlp_srvr.h" #include "core/hle/service/dlp/dlp_srvr.h"
#include "common/archives.h"
SERIALIZE_EXPORT_IMPL(Service::DLP::DLP_SRVR) SERIALIZE_EXPORT_IMPL(Service::DLP::DLP_SRVR)

View File

@ -17,8 +17,7 @@ private:
void IsChild(Kernel::HLERequestContext& ctx); void IsChild(Kernel::HLERequestContext& ctx);
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this); ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
} }
friend class boost::serialization::access; friend class boost::serialization::access;

View File

@ -266,8 +266,7 @@ private:
std::array<std::shared_ptr<Kernel::Event>, AudioCore::num_dsp_pipe> pipes = {{}}; std::array<std::shared_ptr<Kernel::Event>, AudioCore::num_dsp_pipe> pipes = {{}};
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this); ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
ar& semaphore_event; ar& semaphore_event;
ar& preset_semaphore; ar& preset_semaphore;

View File

@ -21,14 +21,13 @@ SERIALIZE_EXPORT_IMPL(Service::ERR::ERR_F)
namespace boost::serialization { namespace boost::serialization {
template <class Archive> template <class Archive>
void load_construct_data(Archive& ar, Service::ERR::ERR_F* t, const unsigned int) void load_construct_data(Archive& ar, Service::ERR::ERR_F* t, const unsigned int) {
{
::new (t) Service::ERR::ERR_F(Core::Global<Core::System>()); ::new (t) Service::ERR::ERR_F(Core::Global<Core::System>());
} }
template template void load_construct_data<iarchive>(iarchive& ar, Service::ERR::ERR_F* t,
void load_construct_data<iarchive>(iarchive& ar, Service::ERR::ERR_F* t, const unsigned int); const unsigned int);
} } // namespace boost::serialization
namespace Service::ERR { namespace Service::ERR {

View File

@ -36,8 +36,7 @@ private:
Core::System& system; Core::System& system;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this); ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
} }
friend class boost::serialization::access; friend class boost::serialization::access;

View File

@ -21,8 +21,7 @@ struct FriendKey {
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& friend_id; ar& friend_id;
ar& unknown; ar& unknown;
ar& friend_code; ar& friend_code;
@ -35,8 +34,7 @@ struct MyPresence {
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& unknown; ar& unknown;
} }
friend class boost::serialization::access; friend class boost::serialization::access;
@ -157,8 +155,7 @@ private:
MyPresence my_presence = {}; MyPresence my_presence = {};
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& my_friend_key; ar& my_friend_key;
ar& my_presence; ar& my_presence;
} }

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/frd/frd_a.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/frd/frd_a.h"
SERIALIZE_EXPORT_IMPL(Service::FRD::FRD_A) SERIALIZE_EXPORT_IMPL(Service::FRD::FRD_A)

View File

@ -11,6 +11,7 @@ namespace Service::FRD {
class FRD_A final : public Module::Interface { class FRD_A final : public Module::Interface {
public: public:
explicit FRD_A(std::shared_ptr<Module> frd); explicit FRD_A(std::shared_ptr<Module> frd);
private: private:
SERVICE_SERIALIZATION(FRD_A, frd, Module) SERVICE_SERIALIZATION(FRD_A, frd, Module)
}; };

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/frd/frd_u.h"
#include "common/archives.h" #include "common/archives.h"
#include "core/hle/service/frd/frd_u.h"
SERIALIZE_EXPORT_IMPL(Service::FRD::FRD_U) SERIALIZE_EXPORT_IMPL(Service::FRD::FRD_U)

View File

@ -11,6 +11,7 @@ namespace Service::FRD {
class FRD_U final : public Module::Interface { class FRD_U final : public Module::Interface {
public: public:
explicit FRD_U(std::shared_ptr<Module> frd); explicit FRD_U(std::shared_ptr<Module> frd);
private: private:
SERVICE_SERIALIZATION(FRD_U, frd, Module) SERVICE_SERIALIZATION(FRD_U, frd, Module)
}; };

View File

@ -13,6 +13,7 @@
#include "common/common_types.h" #include "common/common_types.h"
#include "common/file_util.h" #include "common/file_util.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/core.h"
#include "core/file_sys/archive_backend.h" #include "core/file_sys/archive_backend.h"
#include "core/file_sys/archive_extsavedata.h" #include "core/file_sys/archive_extsavedata.h"
#include "core/file_sys/archive_ncch.h" #include "core/file_sys/archive_ncch.h"
@ -27,7 +28,6 @@
#include "core/file_sys/file_backend.h" #include "core/file_sys/file_backend.h"
#include "core/hle/result.h" #include "core/hle/result.h"
#include "core/hle/service/fs/archive.h" #include "core/hle/service/fs/archive.h"
#include "core/core.h"
namespace Service::FS { namespace Service::FS {

View File

@ -25,8 +25,7 @@ struct ClientSlot : public Kernel::SessionRequestHandler::SessionDataBase {
private: private:
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& program_id; ar& program_id;
} }
friend class boost::serialization::access; friend class boost::serialization::access;
@ -555,8 +554,7 @@ private:
ArchiveManager& archives; ArchiveManager& archives;
template <class Archive> template <class Archive>
void serialize(Archive& ar, const unsigned int) void serialize(Archive& ar, const unsigned int) {
{
ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this); ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this);
ar& priority; ar& priority;
} }

Some files were not shown because too many files have changed in this diff Show More