Use CSizeComputer to avoid counting sizes in SerializationOp
This commit is contained in:
committed by
Kamil Domanski
parent
84881f8c47
commit
31e9a8384a
@@ -49,8 +49,7 @@ public:
|
||||
IMPLEMENT_SERIALIZE;
|
||||
|
||||
template <typename Stream, typename Operation>
|
||||
inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
|
||||
size_t nSerSize = 0;
|
||||
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
|
||||
READWRITE(this->nVersion);
|
||||
nVersion = this->nVersion;
|
||||
READWRITE(nRelayUntil);
|
||||
@@ -66,7 +65,6 @@ public:
|
||||
READWRITE(LIMITED_STRING(strComment, 65536));
|
||||
READWRITE(LIMITED_STRING(strStatusBar, 256));
|
||||
READWRITE(LIMITED_STRING(strReserved, 256));
|
||||
return nSerSize;
|
||||
}
|
||||
|
||||
void SetNull();
|
||||
@@ -89,11 +87,9 @@ public:
|
||||
IMPLEMENT_SERIALIZE;
|
||||
|
||||
template <typename Stream, typename Operation>
|
||||
inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
|
||||
size_t nSerSize = 0;
|
||||
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
|
||||
READWRITE(vchMsg);
|
||||
READWRITE(vchSig);
|
||||
return nSerSize;
|
||||
}
|
||||
|
||||
void SetNull();
|
||||
|
||||
Reference in New Issue
Block a user