aboutsummaryrefslogtreecommitdiff
path: root/src/serialize.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/serialize.h')
-rw-r--r--src/serialize.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/serialize.h b/src/serialize.h
index 8bd3ef5d76..ae8e11a43a 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -901,10 +901,9 @@ class CSizeComputer
protected:
size_t nSize;
- const int nType;
const int nVersion;
public:
- CSizeComputer(int nTypeIn, int nVersionIn) : nSize(0), nType(nTypeIn), nVersion(nVersionIn) {}
+ explicit CSizeComputer(int nVersionIn) : nSize(0), nVersion(nVersionIn) {}
void write(const char *psz, size_t _nSize)
{
@@ -929,7 +928,6 @@ public:
}
int GetVersion() const { return nVersion; }
- int GetType() const { return nType; }
};
template<typename Stream>
@@ -980,15 +978,15 @@ inline void WriteCompactSize(CSizeComputer &s, uint64_t nSize)
}
template <typename T>
-size_t GetSerializeSize(const T& t, int nType, int nVersion = 0)
+size_t GetSerializeSize(const T& t, int nVersion = 0)
{
- return (CSizeComputer(nType, nVersion) << t).size();
+ return (CSizeComputer(nVersion) << t).size();
}
template <typename S, typename T>
size_t GetSerializeSize(const S& s, const T& t)
{
- return (CSizeComputer(s.GetType(), s.GetVersion()) << t).size();
+ return (CSizeComputer(s.GetVersion()) << t).size();
}
template <typename S, typename... T>