mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Get rid of VARINT default argument
This removes the need for the GNU C++ extension of variadic macros.
This commit is contained in:
@@ -493,12 +493,13 @@ public:
|
||||
template<typename Formatter, typename T>
|
||||
static inline Wrapper<Formatter, T&> Using(T&& t) { return Wrapper<Formatter, T&>(t); }
|
||||
|
||||
#define VARINT(obj, ...) Using<VarIntFormatter<__VA_ARGS__>>(obj)
|
||||
#define VARINT_MODE(obj, mode) Using<VarIntFormatter<mode>>(obj)
|
||||
#define VARINT(obj) Using<VarIntFormatter<VarIntMode::DEFAULT>>(obj)
|
||||
#define COMPACTSIZE(obj) CCompactSize(REF(obj))
|
||||
#define LIMITED_STRING(obj,n) LimitedString< n >(REF(obj))
|
||||
|
||||
/** Serialization wrapper class for integers in VarInt format. */
|
||||
template<VarIntMode Mode=VarIntMode::DEFAULT>
|
||||
template<VarIntMode Mode>
|
||||
struct VarIntFormatter
|
||||
{
|
||||
template<typename Stream, typename I> void Ser(Stream &s, I v)
|
||||
|
||||
Reference in New Issue
Block a user