This is another small improvement taken from #10785.
Instead of manually converting from/to BE format in the CService
serializer, provide a generic way in serialize.h to serialize BE data (only 16 bits for now).
435+ }
436+
437+ template<typename Stream>
438+ void Serialize(Stream& s) const
439+ {
440+ if (sizeof(I) == 2) ser_writedata16be(s, m_val);
if (sizeof(I) == 2)
?
if (sizeof(I) == 2)
clauses, and added extra comments and checks.
utACK ece88fd.
Makes sense to also replace unsigned short port
and unsigned short GetPort()
with uint16_t?
Labels
Refactoring