aboutsummaryrefslogtreecommitdiff
path: root/src/serialize.h
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2018-06-22 18:27:18 +0000
committerBen Woosley <ben.woosley@gmail.com>2018-09-11 00:58:05 -0400
commitda74db0940720407fafaf3582bbaf9c81a4d3b4d (patch)
tree12ea45e64d4da961a7f89a718ea3c9bb233ea173 /src/serialize.h
parent4e9a6f87b7d25d56fca4166bd929003cf15c9b58 (diff)
downloadbitcoin-da74db0940720407fafaf3582bbaf9c81a4d3b4d.tar.xz
Drop unused GetType() from CSizeComputer
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>