mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Drop minor GetSerializeSize template
Now that `GetType()` is not propagated, the benefits are not worth the code.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user