* Respect endiannes for item lengths inside swapped BMessages
* Also swap the flattened size when creating the read buffer * Define specialized byte_swap()s for unsigned types too so that type_code and the like get swapped correctly This should fix bug #1371. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21901 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -136,6 +136,14 @@ byte_swap(int64 &data)
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
inline void
|
||||
byte_swap(uint64 &data)
|
||||
{
|
||||
data = __swap_int64(data);
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
inline void
|
||||
byte_swap(int32 &data)
|
||||
@@ -144,6 +152,14 @@ byte_swap(int32 &data)
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
inline void
|
||||
byte_swap(uint32 &data)
|
||||
{
|
||||
data = __swap_int32(data);
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
inline void
|
||||
byte_swap(int16 &data)
|
||||
@@ -152,6 +168,14 @@ byte_swap(int16 &data)
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
inline void
|
||||
byte_swap(uint16 &data)
|
||||
{
|
||||
data = __swap_int16(data);
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
inline void
|
||||
byte_swap(entry_ref &data)
|
||||
|
||||
Reference in New Issue
Block a user