Serializer simplifications after IMPLEMENT_SERIALIZE overhaul

This commit is contained in:
Pieter Wuille
2014-09-01 21:36:46 +02:00
parent 2e731f24b5
commit 47eb76597e
7 changed files with 43 additions and 66 deletions

View File

@@ -28,19 +28,15 @@ public:
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
bool fRead = ser_action.ForRead();
RecentRequestEntry* pthis = const_cast<RecentRequestEntry*>(this);
unsigned int nDate = date.toTime_t();
READWRITE(pthis->nVersion);
nVersion = pthis->nVersion;
READWRITE(this->nVersion);
nVersion = this->nVersion;
READWRITE(id);
READWRITE(nDate);
READWRITE(recipient);
if (fRead)
if (ser_action.ForRead())
date = QDateTime::fromTime_t(nDate);
}
};