aboutsummaryrefslogtreecommitdiff
path: root/src/streams.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-10-28 16:51:33 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2016-11-07 13:56:22 -0800
commit657e05ab2e87ff725723fe8a375fc3f8aad02126 (patch)
treee20cebbde1dee31d6d21dccdaa2223a5ca1566e3 /src/streams.h
parentfad9b66504f176ed3624515f3bf4d428cf687607 (diff)
downloadbitcoin-657e05ab2e87ff725723fe8a375fc3f8aad02126.tar.xz
Make GetSerializeSize a wrapper on top of CSizeComputer
Given that in default GetSerializeSize implementations created by ADD_SERIALIZE_METHODS we're already using CSizeComputer(), get rid of the specialized GetSerializeSize methods everywhere, and just use CSizeComputer. This removes a lot of code which isn't actually used anywhere. For CCompactSize and CVarInt this actually removes a more efficient size computing algorithm, which is brought back in a later commit.
Diffstat (limited to 'src/streams.h')
-rw-r--r--src/streams.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/streams.h b/src/streams.h
index 12a36a4a70..d9965b534d 100644
--- a/src/streams.h
+++ b/src/streams.h
@@ -309,13 +309,6 @@ public:
}
template<typename T>
- unsigned int GetSerializeSize(const T& obj)
- {
- // Tells the size of the object if serialized to this stream
- return ::GetSerializeSize(obj, nType, nVersion);
- }
-
- template<typename T>
CDataStream& operator<<(const T& obj)
{
// Serialize to this stream
@@ -458,13 +451,6 @@ public:
}
template<typename T>
- unsigned int GetSerializeSize(const T& obj)
- {
- // Tells the size of the object if serialized to this stream
- return ::GetSerializeSize(obj, nType, nVersion);
- }
-
- template<typename T>
CAutoFile& operator<<(const T& obj)
{
// Serialize to this stream