aboutsummaryrefslogtreecommitdiff
path: root/src/serialize.h
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2018-06-14 19:48:30 -0500
committerBen Woosley <ben.woosley@gmail.com>2018-09-11 00:58:13 -0400
commit893628be0166b4096b6e52f516e0f65bb63a75a2 (patch)
tree59b7512c8f429312dd137429251c0df9f89942a4 /src/serialize.h
parentda74db0940720407fafaf3582bbaf9c81a4d3b4d (diff)
Drop minor GetSerializeSize template
Now that `GetType()` is not propagated, the benefits are not worth the code.
Diffstat (limited to 'src/serialize.h')
-rw-r--r--src/serialize.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/serialize.h b/src/serialize.h
index ae8e11a43a..2d0cfbbbf0 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -983,16 +983,10 @@ size_t GetSerializeSize(const T& t, int nVersion = 0)
return (CSizeComputer(nVersion) << t).size();
}
-template <typename S, typename T>
-size_t GetSerializeSize(const S& s, const T& t)
+template <typename... T>
+size_t GetSerializeSizeMany(int nVersion, const T&... t)
{
- return (CSizeComputer(s.GetVersion()) << t).size();
-}
-
-template <typename S, typename... T>
-size_t GetSerializeSizeMany(const S& s, const T&... t)
-{
- CSizeComputer sc(s.GetType(), s.GetVersion());
+ CSizeComputer sc(nVersion);
SerializeMany(sc, t...);
return sc.size();
}