@@ -189,7 +189,9 @@ template<typename X> const X& ReadWriteAsHelper(const X& x) { return x; }
189
189
SerializationOp (s, CSerActionUnserialize ()); \
190
190
}
191
191
192
+ #ifndef CHAR_EQUALS_INT8
192
193
template <typename Stream> inline void Serialize (Stream& s, char a ) { ser_writedata8 (s, a); } // TODO Get rid of bare char
194
+ #endif
193
195
template <typename Stream> inline void Serialize (Stream& s, int8_t a ) { ser_writedata8 (s, a); }
194
196
template <typename Stream> inline void Serialize (Stream& s, uint8_t a ) { ser_writedata8 (s, a); }
195
197
template <typename Stream> inline void Serialize (Stream& s, int16_t a ) { ser_writedata16 (s, a); }
@@ -205,7 +207,9 @@ template<typename Stream, int N> inline void Serialize(Stream& s, const unsigned
205
207
template <typename Stream> inline void Serialize (Stream& s, const Span<const unsigned char >& span) { s.write (CharCast (span.data ()), span.size ()); }
206
208
template <typename Stream> inline void Serialize (Stream& s, const Span<unsigned char >& span) { s.write (CharCast (span.data ()), span.size ()); }
207
209
210
+ #ifndef CHAR_EQUALS_INT8
208
211
template <typename Stream> inline void Unserialize (Stream& s, char & a ) { a = ser_readdata8 (s); } // TODO Get rid of bare char
212
+ #endif
209
213
template <typename Stream> inline void Unserialize (Stream& s, int8_t & a ) { a = ser_readdata8 (s); }
210
214
template <typename Stream> inline void Unserialize (Stream& s, uint8_t & a ) { a = ser_readdata8 (s); }
211
215
template <typename Stream> inline void Unserialize (Stream& s, int16_t & a ) { a = ser_readdata16 (s); }
0 commit comments