From 5d96b4ae0188fcad36105642c5d69249d37fdbb5 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Wed, 20 Aug 2014 18:09:29 +0200 Subject: [PATCH] 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. --- src/serialize.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/serialize.h b/src/serialize.h index 7e0ecc2edfd..c0666d30a5c 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -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 \ @@ -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 { };