@@ -43,26 +43,6 @@ static const unsigned int MAX_VECTOR_ALLOCATE = 5000000;
43
43
struct deserialize_type {};
44
44
constexpr deserialize_type deserialize {};
45
45
46
- /* *
47
- * Used to bypass the rule against non-const reference to temporary
48
- * where it makes sense with wrappers.
49
- */
50
- template <typename T>
51
- inline T& REF (const T& val)
52
- {
53
- return const_cast <T&>(val);
54
- }
55
-
56
- /* *
57
- * Used to acquire a non-const pointer "this" to generate bodies
58
- * of const serialization operations from a template
59
- */
60
- template <typename T>
61
- inline T* NCONST_PTR (const T* val)
62
- {
63
- return const_cast <T*>(val);
64
- }
65
-
66
46
// ! Safely convert odd char pointer types to standard ones.
67
47
inline char * CharCast (char * c) { return c; }
68
48
inline char * CharCast (unsigned char * c) { return (char *)c; }
@@ -193,22 +173,6 @@ template<typename X> const X& ReadWriteAsHelper(const X& x) { return x; }
193
173
#define SER_READ (obj, code ) ::SerRead(s, ser_action, obj, [&](Stream& s, typename std::remove_const<Type>::type& obj) { code; })
194
174
#define SER_WRITE (obj, code ) ::SerWrite(s, ser_action, obj, [&](Stream& s, const Type& obj) { code; })
195
175
196
- /* *
197
- * Implement three methods for serializable objects. These are actually wrappers over
198
- * "SerializationOp" template, which implements the body of each class' serialization
199
- * code. Adding "ADD_SERIALIZE_METHODS" in the body of the class causes these wrappers to be
200
- * added as members.
201
- */
202
- #define ADD_SERIALIZE_METHODS \
203
- template <typename Stream> \
204
- void Serialize (Stream& s) const { \
205
- NCONST_PTR (this )->SerializationOp (s, CSerActionSerialize ()); \
206
- } \
207
- template <typename Stream> \
208
- void Unserialize (Stream& s) { \
209
- SerializationOp (s, CSerActionUnserialize ()); \
210
- }
211
-
212
176
/* *
213
177
* Implement the Ser and Unser methods needed for implementing a formatter (see Using below).
214
178
*
@@ -1004,7 +968,7 @@ void Unserialize(Stream& is, std::shared_ptr<const T>& p)
1004
968
1005
969
1006
970
/* *
1007
- * Support for ADD_SERIALIZE_METHODS and READWRITE macro
971
+ * Support for SERIALIZE_METHODS and READWRITE macro.
1008
972
*/
1009
973
struct CSerActionSerialize
1010
974
{
0 commit comments