mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Merge READWRITEMANY into READWRITE
This commit is contained in:
parent
0630974647
commit
2761bca997
@ -148,8 +148,7 @@ enum
|
||||
SER_GETHASH = (1 << 2),
|
||||
};
|
||||
|
||||
#define READWRITE(obj) (::SerReadWrite(s, (obj), ser_action))
|
||||
#define READWRITEMANY(...) (::SerReadWriteMany(s, ser_action, __VA_ARGS__))
|
||||
#define READWRITE(...) (::SerReadWriteMany(s, ser_action, __VA_ARGS__))
|
||||
|
||||
/**
|
||||
* Implement three methods for serializable objects. These are actually wrappers over
|
||||
@ -825,19 +824,6 @@ struct CSerActionUnserialize
|
||||
constexpr bool ForRead() const { return true; }
|
||||
};
|
||||
|
||||
template<typename Stream, typename T>
|
||||
inline void SerReadWrite(Stream& s, const T& obj, CSerActionSerialize ser_action)
|
||||
{
|
||||
::Serialize(s, obj);
|
||||
}
|
||||
|
||||
template<typename Stream, typename T>
|
||||
inline void SerReadWrite(Stream& s, T& obj, CSerActionUnserialize ser_action)
|
||||
{
|
||||
::Unserialize(s, obj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -897,12 +883,6 @@ void SerializeMany(Stream& s)
|
||||
{
|
||||
}
|
||||
|
||||
template<typename Stream, typename Arg>
|
||||
void SerializeMany(Stream& s, Arg&& arg)
|
||||
{
|
||||
::Serialize(s, std::forward<Arg>(arg));
|
||||
}
|
||||
|
||||
template<typename Stream, typename Arg, typename... Args>
|
||||
void SerializeMany(Stream& s, Arg&& arg, Args&&... args)
|
||||
{
|
||||
@ -915,12 +895,6 @@ inline void UnserializeMany(Stream& s)
|
||||
{
|
||||
}
|
||||
|
||||
template<typename Stream, typename Arg>
|
||||
inline void UnserializeMany(Stream& s, Arg& arg)
|
||||
{
|
||||
::Unserialize(s, arg);
|
||||
}
|
||||
|
||||
template<typename Stream, typename Arg, typename... Args>
|
||||
inline void UnserializeMany(Stream& s, Arg& arg, Args&... args)
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
|
||||
template <typename Stream, typename Operation>
|
||||
inline void SerializationOp(Stream& s, Operation ser_action) {
|
||||
READWRITEMANY(intval, boolval, stringval, FLATDATA(charstrval), txval);
|
||||
READWRITE(intval, boolval, stringval, FLATDATA(charstrval), txval);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user