aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2018-03-13 16:35:01 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2018-03-13 17:04:28 -0700
commit2761bca99753951e1ad8bf51e3fce8fd309b4612 (patch)
tree18cca7342fffb4576087794fba105c2f76d7ed5f
parent0630974647dacaf25e7fcb7f9cbb785bb078ede6 (diff)
Merge READWRITEMANY into READWRITE
-rw-r--r--src/serialize.h28
-rw-r--r--src/test/serialize_tests.cpp2
2 files changed, 2 insertions, 28 deletions
diff --git a/src/serialize.h b/src/serialize.h
index dcc8d8691e..862fe39e45 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -148,8 +148,7 @@ enum
SER_GETHASH = (1 << 2),
};
-#define READWRITE(obj) (::SerReadWrite(s, (obj), ser_action))
-#define READWRITEMANY(...) (::SerReadWriteMany(s, ser_action, __VA_ARGS__))
+#define READWRITE(...) (::SerReadWriteMany(s, ser_action, __VA_ARGS__))
/**
* Implement three methods for serializable objects. These are actually wrappers over
@@ -825,19 +824,6 @@ struct CSerActionUnserialize
constexpr bool ForRead() const { return true; }
};
-template<typename Stream, typename T>
-inline void SerReadWrite(Stream& s, const T& obj, CSerActionSerialize ser_action)
-{
- ::Serialize(s, obj);
-}
-
-template<typename Stream, typename T>
-inline void SerReadWrite(Stream& s, T& obj, CSerActionUnserialize ser_action)
-{
- ::Unserialize(s, obj);
-}
-
-
@@ -897,12 +883,6 @@ void SerializeMany(Stream& s)
{
}
-template<typename Stream, typename Arg>
-void SerializeMany(Stream& s, Arg&& arg)
-{
- ::Serialize(s, std::forward<Arg>(arg));
-}
-
template<typename Stream, typename Arg, typename... Args>
void SerializeMany(Stream& s, Arg&& arg, Args&&... args)
{
@@ -915,12 +895,6 @@ inline void UnserializeMany(Stream& s)
{
}
-template<typename Stream, typename Arg>
-inline void UnserializeMany(Stream& s, Arg& arg)
-{
- ::Unserialize(s, arg);
-}
-
template<typename Stream, typename Arg, typename... Args>
inline void UnserializeMany(Stream& s, Arg& arg, Args&... args)
{
diff --git a/src/test/serialize_tests.cpp b/src/test/serialize_tests.cpp
index 4595519435..42fd59380a 100644
--- a/src/test/serialize_tests.cpp
+++ b/src/test/serialize_tests.cpp
@@ -53,7 +53,7 @@ public:
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action) {
- READWRITEMANY(intval, boolval, stringval, FLATDATA(charstrval), txval);
+ READWRITE(intval, boolval, stringval, FLATDATA(charstrval), txval);
}
};