mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Merge READWRITEMANY into READWRITE
This commit is contained in:
parent
0630974647
commit
2761bca997
@ -148,8 +148,7 @@ enum
|
|||||||
SER_GETHASH = (1 << 2),
|
SER_GETHASH = (1 << 2),
|
||||||
};
|
};
|
||||||
|
|
||||||
#define READWRITE(obj) (::SerReadWrite(s, (obj), ser_action))
|
#define READWRITE(...) (::SerReadWriteMany(s, ser_action, __VA_ARGS__))
|
||||||
#define READWRITEMANY(...) (::SerReadWriteMany(s, ser_action, __VA_ARGS__))
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implement three methods for serializable objects. These are actually wrappers over
|
* Implement three methods for serializable objects. These are actually wrappers over
|
||||||
@ -825,19 +824,6 @@ struct CSerActionUnserialize
|
|||||||
constexpr bool ForRead() const { return true; }
|
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>
|
template<typename Stream, typename Arg, typename... Args>
|
||||||
void SerializeMany(Stream& s, Arg&& arg, Args&&... 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>
|
template<typename Stream, typename Arg, typename... Args>
|
||||||
inline void UnserializeMany(Stream& s, Arg& arg, Args&... args)
|
inline void UnserializeMany(Stream& s, Arg& arg, Args&... args)
|
||||||
{
|
{
|
||||||
|
@ -53,7 +53,7 @@ public:
|
|||||||
|
|
||||||
template <typename Stream, typename Operation>
|
template <typename Stream, typename Operation>
|
||||||
inline void SerializationOp(Stream& s, Operation ser_action) {
|
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