trivial: move GetSerializeSize away from Stream (Un)serialize functions

done to reduce the number of conflicts associated with the unexpected
forward decl, moved it just above WriteAutoBitSet and added comment to
clarify reason.
This commit is contained in:
Kittywhiskers Van Gogh 2024-02-22 18:01:13 +00:00 committed by pasta
parent cdc7df744c
commit d9a8ce2749
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -265,7 +265,6 @@ template<typename Stream> inline void Unserialize(Stream& s, Span<unsigned char>
template<typename Stream> inline void Serialize(Stream& s, bool a) { char f=a; ser_writedata8(s, f); }
template<typename Stream> inline void Unserialize(Stream& s, bool& a) { char f=ser_readdata8(s); a=f; }
template <typename T> size_t GetSerializeSize(const T& t, int nVersion = 0);
@ -551,6 +550,9 @@ struct CFixedVarIntsBitSet
void Serialize(Stream& s) const { WriteFixedVarIntsBitSet(s, vec, vec.size()); }
};
/* Forward declaration for WriteAutoBitSet */
template <typename T> size_t GetSerializeSize(const T& t, int nVersion = 0);
template<typename Stream>
void WriteAutoBitSet(Stream& s, const autobitset_t& item)
{