@@ -188,11 +188,11 @@ const Out& AsBase(const In& x)
188
188
*/
189
189
#define FORMATTER_METHODS (cls, obj ) \
190
190
template <typename Stream> \
191
- static void Ser (Stream& s, const cls& obj) { SerializationOps (obj, s, CSerActionSerialize () ); } \
191
+ static void Ser (Stream& s, const cls& obj) { SerializationOps (obj, s, ActionSerialize{} ); } \
192
192
template <typename Stream> \
193
- static void Unser (Stream& s, cls& obj) { SerializationOps (obj, s, CSerActionUnserialize () ); } \
193
+ static void Unser (Stream& s, cls& obj) { SerializationOps (obj, s, ActionUnserialize{} ); } \
194
194
template <typename Stream, typename Type, typename Operation> \
195
- static inline void SerializationOps (Type& obj, Stream& s, Operation ser_action) \
195
+ static void SerializationOps (Type& obj, Stream& s, Operation ser_action)
196
196
197
197
/* *
198
198
* Implement the Serialize and Unserialize methods by delegating to a single templated
@@ -953,26 +953,17 @@ void Unserialize(Stream& is, std::shared_ptr<const T>& p)
953
953
}
954
954
955
955
956
-
957
956
/* *
958
- * Support for SERIALIZE_METHODS and READWRITE macro .
957
+ * Support for all macros providing or using the ser_action parameter of the SerializationOps method .
959
958
*/
960
- struct CSerActionSerialize
961
- {
959
+ struct ActionSerialize {
962
960
constexpr bool ForRead () const { return false ; }
963
961
};
964
- struct CSerActionUnserialize
965
- {
962
+ struct ActionUnserialize {
966
963
constexpr bool ForRead () const { return true ; }
967
964
};
968
965
969
966
970
-
971
-
972
-
973
-
974
-
975
-
976
967
/* ::GetSerializeSize implementations
977
968
*
978
969
* Computing the serialized size of objects is done through a special stream
@@ -1031,36 +1022,36 @@ inline void UnserializeMany(Stream& s, Args&&... args)
1031
1022
}
1032
1023
1033
1024
template <typename Stream, typename ... Args>
1034
- inline void SerReadWriteMany (Stream& s, CSerActionSerialize ser_action, const Args&... args)
1025
+ inline void SerReadWriteMany (Stream& s, ActionSerialize ser_action, const Args&... args)
1035
1026
{
1036
1027
::SerializeMany (s, args...);
1037
1028
}
1038
1029
1039
1030
template <typename Stream, typename ... Args>
1040
- inline void SerReadWriteMany (Stream& s, CSerActionUnserialize ser_action, Args&&... args)
1031
+ inline void SerReadWriteMany (Stream& s, ActionUnserialize ser_action, Args&&... args)
1041
1032
{
1042
1033
::UnserializeMany (s, args...);
1043
1034
}
1044
1035
1045
1036
template <typename Stream, typename Type, typename Fn>
1046
- inline void SerRead (Stream& s, CSerActionSerialize ser_action, Type&&, Fn&&)
1037
+ inline void SerRead (Stream& s, ActionSerialize ser_action, Type&&, Fn&&)
1047
1038
{
1048
1039
}
1049
1040
1050
1041
template <typename Stream, typename Type, typename Fn>
1051
- inline void SerRead (Stream& s, CSerActionUnserialize ser_action, Type&& obj, Fn&& fn)
1042
+ inline void SerRead (Stream& s, ActionUnserialize ser_action, Type&& obj, Fn&& fn)
1052
1043
{
1053
1044
fn (s, std::forward<Type>(obj));
1054
1045
}
1055
1046
1056
1047
template <typename Stream, typename Type, typename Fn>
1057
- inline void SerWrite (Stream& s, CSerActionSerialize ser_action, Type&& obj, Fn&& fn)
1048
+ inline void SerWrite (Stream& s, ActionSerialize ser_action, Type&& obj, Fn&& fn)
1058
1049
{
1059
1050
fn (s, std::forward<Type>(obj));
1060
1051
}
1061
1052
1062
1053
template <typename Stream, typename Type, typename Fn>
1063
- inline void SerWrite (Stream& s, CSerActionUnserialize ser_action, Type&&, Fn&&)
1054
+ inline void SerWrite (Stream& s, ActionUnserialize ser_action, Type&&, Fn&&)
1064
1055
{
1065
1056
}
1066
1057
0 commit comments