Merge pull request #4737
31e9a83Use CSizeComputer to avoid counting sizes in SerializationOp (Pieter Wuille)84881f8rework overhauled serialization methods to non-static (Kamil Domanski)5d96b4aremove fields of ser_streamplaceholder (Kamil Domanski)3d796f8overhaul serialization code (Kamil Domanski)
This commit is contained in:
@@ -24,8 +24,12 @@ public:
|
||||
QDateTime date;
|
||||
SendCoinsRecipient recipient;
|
||||
|
||||
IMPLEMENT_SERIALIZE
|
||||
(
|
||||
IMPLEMENT_SERIALIZE;
|
||||
|
||||
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();
|
||||
@@ -37,8 +41,8 @@ public:
|
||||
READWRITE(recipient);
|
||||
|
||||
if (fRead)
|
||||
pthis->date = QDateTime::fromTime_t(nDate);
|
||||
)
|
||||
date = QDateTime::fromTime_t(nDate);
|
||||
}
|
||||
};
|
||||
|
||||
class RecentRequestEntryLessThan
|
||||
|
||||
@@ -59,8 +59,12 @@ public:
|
||||
static const int CURRENT_VERSION = 1;
|
||||
int nVersion;
|
||||
|
||||
IMPLEMENT_SERIALIZE
|
||||
(
|
||||
IMPLEMENT_SERIALIZE;
|
||||
|
||||
template <typename Stream, typename Operation>
|
||||
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
|
||||
bool fRead = ser_action.ForRead();
|
||||
|
||||
SendCoinsRecipient* pthis = const_cast<SendCoinsRecipient*>(this);
|
||||
|
||||
std::string sAddress = pthis->address.toStdString();
|
||||
@@ -89,7 +93,7 @@ public:
|
||||
pthis->paymentRequest.parse(QByteArray::fromRawData(sPaymentRequest.data(), sPaymentRequest.size()));
|
||||
pthis->authenticatedMerchant = QString::fromStdString(sAuthenticatedMerchant);
|
||||
}
|
||||
)
|
||||
}
|
||||
};
|
||||
|
||||
/** Interface to Bitcoin wallet from Qt view code. */
|
||||
|
||||
Reference in New Issue
Block a user