diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2018-06-14 19:48:30 -0500 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2018-09-11 00:58:13 -0400 |
commit | 893628be0166b4096b6e52f516e0f65bb63a75a2 (patch) | |
tree | 59b7512c8f429312dd137429251c0df9f89942a4 /src/serialize.h | |
parent | da74db0940720407fafaf3582bbaf9c81a4d3b4d (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.h | 12 |
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(); } |