Skip to content

Commit 3bab9b6

Browse files
joevtdingusdev
authored andcommitted
endianswap: Convert tabs to spaces.
1 parent 25beb13 commit 3bab9b6

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

endianswap.h

+16-16
Original file line numberDiff line numberDiff line change
@@ -69,26 +69,26 @@ inline std::uint16_t byteswap_16_impl(std::uint16_t x)
6969

7070
inline std::uint32_t byteswap_32_impl(std::uint32_t x)
7171
{
72-
return (
73-
((x & UINT32_C(0x000000FF)) << 24)
74-
| ((x & UINT32_C(0x0000FF00)) << 8)
75-
| ((x & UINT32_C(0x00FF0000)) >> 8)
76-
| ((x & UINT32_C(0xFF000000)) >> 24)
77-
);
72+
return (
73+
((x & UINT32_C(0x000000FF)) << 24)
74+
| ((x & UINT32_C(0x0000FF00)) << 8)
75+
| ((x & UINT32_C(0x00FF0000)) >> 8)
76+
| ((x & UINT32_C(0xFF000000)) >> 24)
77+
);
7878
}
7979

8080
inline std::uint64_t byteswap_64_impl(std::uint64_t x)
8181
{
82-
return (
83-
((x & UINT64_C(0x00000000000000FF)) << 56)
84-
| ((x & UINT64_C(0x000000000000FF00)) << 40)
85-
| ((x & UINT64_C(0x0000000000FF0000)) << 24)
86-
| ((x & UINT64_C(0x00000000FF000000)) << 8)
87-
| ((x & UINT64_C(0x000000FF00000000)) >> 8)
88-
| ((x & UINT64_C(0x0000FF0000000000)) >> 24)
89-
| ((x & UINT64_C(0x00FF000000000000)) >> 40)
90-
| ((x & UINT64_C(0xFF00000000000000)) >> 56)
91-
);
82+
return (
83+
((x & UINT64_C(0x00000000000000FF)) << 56)
84+
| ((x & UINT64_C(0x000000000000FF00)) << 40)
85+
| ((x & UINT64_C(0x0000000000FF0000)) << 24)
86+
| ((x & UINT64_C(0x00000000FF000000)) << 8)
87+
| ((x & UINT64_C(0x000000FF00000000)) >> 8)
88+
| ((x & UINT64_C(0x0000FF0000000000)) >> 24)
89+
| ((x & UINT64_C(0x00FF000000000000)) >> 40)
90+
| ((x & UINT64_C(0xFF00000000000000)) >> 56)
91+
);
9292
}
9393

9494
# define BYTESWAP_16(x) (byteswap_16_impl(x))

0 commit comments

Comments
 (0)