Files
scylladb/net
Nadav Har'El 2c78fcdc4e clean up byteorder.hh
byteorder.hh's "net::packed<T>" subclassed the basic unaligned<T> and
added a "adjust_endianess" method. This was completely unnecessary:
While ntoh's generic implementation indeed uses that method, we also
have a specialized overload for ntoh(packed<T>), so the generic
implementation would never be used for packed<T> anyway!

So for net::packed<T> we don't need anything more than unaligned<T>,
and can just make it an alias.

As a bonus, the "hton" function will now work also on unaligned<T>
(such as the result of the convenient unaligned_cast<>), not just on
net::packed<T>.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-04-08 18:41:48 +03:00
..
2015-04-08 18:41:48 +03:00
2015-02-19 16:58:54 +02:00