mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
remove fields of ser_streamplaceholder
The nType and nVersion fields of stream objects are never accessed from outside the class (or perhaps from the inside too, I haven't checked). Thus no need to have them in a placeholder, whose only purpose is to fill the "Stream" template parameter in serialization implementation.
This commit is contained in:
parent
3d796f8996
commit
5d96b4ae01
@ -97,8 +97,6 @@ enum
|
||||
#define IMPLEMENT_SERIALIZE \
|
||||
size_t GetSerializeSize(int nType, int nVersion) const { \
|
||||
ser_streamplaceholder s; \
|
||||
s.nType = nType; \
|
||||
s.nVersion = nVersion; \
|
||||
return SerializationOp(MAKE_CONST(this), s, CSerActionGetSerializeSize(), nType, nVersion); \
|
||||
} \
|
||||
template<typename Stream> \
|
||||
@ -835,13 +833,7 @@ inline unsigned int SerReadWrite(Stream& s, T& obj, int nType, int nVersion, CSe
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct ser_streamplaceholder
|
||||
{
|
||||
int nType;
|
||||
int nVersion;
|
||||
};
|
||||
|
||||
|
||||
struct ser_streamplaceholder { };
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user