Skip to content

Commit 44203c2

Browse files
author
pfeatherstone
committed
removed unused functions
1 parent da6a576 commit 44203c2

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/http.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ namespace http
1919
return static_cast<uint16_t>(((v & 0x00FF) << 8) | ((v & 0xFF00) >> 8));
2020
}
2121

22-
constexpr uint32_t byte_swap32(uint32_t v)
23-
{
24-
return static_cast<uint32_t>(((v & 0x000000FF) << 24) |
25-
((v & 0x0000FF00) << 8) |
26-
((v & 0x00FF0000) >> 8) |
27-
((v & 0xFF000000) >> 24));
28-
}
29-
3022
constexpr uint64_t byte_swap64(uint64_t v)
3123
{
3224
return static_cast<uint64_t>(((v & 0x00000000000000FFULL) << 56) |
@@ -40,7 +32,6 @@ namespace http
4032
}
4133

4234
static_assert(byte_swap16(0x1234) == 0x3412, "bad swap");
43-
static_assert(byte_swap32(0x12345678) == 0x78563412, "bad swap");
4435
static_assert(byte_swap64(0x123456789abcdef1) == 0xf1debc9a78563412, "bad swap");
4536

4637
//----------------------------------------------------------------------------------------------------------------
@@ -59,11 +50,6 @@ namespace http
5950
return is_little_endian() ? byte_swap16(v) : v;
6051
}
6152

62-
inline uint32_t host_to_b32(uint32_t v)
63-
{
64-
return is_little_endian() ? byte_swap32(v) : v;
65-
}
66-
6753
inline uint64_t host_to_b64(uint64_t v)
6854
{
6955
return is_little_endian() ? byte_swap64(v) : v;

0 commit comments

Comments
 (0)