citra/src/common/pod.h

18 lines
1.4 KiB
C++
Raw Normal View History

2019-08-06 17:45:06 +01:00
#include "boost/serialization/split_member.hpp"
2019-12-27 21:07:29 +00:00
#define SERIALIZE_AS_POD \
private: \
friend class boost::serialization::access; \
template <typename Archive> \
void save(Archive& ar, const unsigned int file_version) const { \
ar.save_binary(this, sizeof(*this)); \
} \
template <typename Archive> \
void load(Archive& ar, const unsigned int file_version) { \
ar.load_binary(this, sizeof(*this)); \
} \
template <class Archive> \
void serialize(Archive& ar, const unsigned int file_version) { \
boost::serialization::split_member(ar, *this, file_version); \
2019-08-06 17:45:06 +01:00
}