mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Code cleanup (#1593)
This commit is contained in:
parent
8df5fedc35
commit
7ab5fb65b2
1 changed files with 3 additions and 3 deletions
|
@ -2024,7 +2024,7 @@ inline bool from_hex_to_i(const std::string &s, size_t i, size_t cnt,
|
|||
}
|
||||
|
||||
inline std::string from_i_to_hex(size_t n) {
|
||||
const char *charset = "0123456789abcdef";
|
||||
static const auto charset = "0123456789abcdef";
|
||||
std::string ret;
|
||||
do {
|
||||
ret = charset[n & 15] + ret;
|
||||
|
@ -2364,7 +2364,7 @@ inline int close_socket(socket_t sock) {
|
|||
}
|
||||
|
||||
template <typename T> inline ssize_t handle_EINTR(T fn) {
|
||||
ssize_t res = false;
|
||||
ssize_t res = 0;
|
||||
while (true) {
|
||||
res = fn();
|
||||
if (res < 0 && errno == EINTR) { continue; }
|
||||
|
@ -3389,7 +3389,7 @@ inline bool brotli_decompressor::decompress(const char *data,
|
|||
return 0;
|
||||
}
|
||||
|
||||
const uint8_t *next_in = reinterpret_cast<const uint8_t *>(data);
|
||||
auto next_in = reinterpret_cast<const uint8_t *>(data);
|
||||
size_t avail_in = data_length;
|
||||
size_t total_out;
|
||||
|
||||
|
|
Loading…
Reference in a new issue