mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Clang-format: fix some header files and remove them from whitelist
This commit is contained in:
parent
b751c59f43
commit
f7088f69ab
12 changed files with 161 additions and 169 deletions
|
@ -30,9 +30,8 @@ static inline std::string hex_encode(const char *data, unsigned int data_size)
|
|||
char buf2[3];
|
||||
buf2[2] = '\0';
|
||||
|
||||
for(unsigned int i = 0; i < data_size; i++)
|
||||
{
|
||||
unsigned char c = (unsigned char) data[i];
|
||||
for (unsigned int i = 0; i < data_size; i++) {
|
||||
unsigned char c = (unsigned char)data[i];
|
||||
buf2[0] = hex_chars[(c & 0xf0) >> 4];
|
||||
buf2[1] = hex_chars[c & 0x0f];
|
||||
ret.append(buf2);
|
||||
|
@ -43,16 +42,16 @@ static inline std::string hex_encode(const char *data, unsigned int data_size)
|
|||
|
||||
static inline std::string hex_encode(const std::string &data)
|
||||
{
|
||||
return hex_encode(data.c_str(), data.size());
|
||||
return hex_encode(data.c_str(), data.size());
|
||||
}
|
||||
|
||||
static inline bool hex_digit_decode(char hexdigit, unsigned char &value)
|
||||
{
|
||||
if(hexdigit >= '0' && hexdigit <= '9')
|
||||
if (hexdigit >= '0' && hexdigit <= '9')
|
||||
value = hexdigit - '0';
|
||||
else if(hexdigit >= 'A' && hexdigit <= 'F')
|
||||
else if (hexdigit >= 'A' && hexdigit <= 'F')
|
||||
value = hexdigit - 'A' + 10;
|
||||
else if(hexdigit >= 'a' && hexdigit <= 'f')
|
||||
else if (hexdigit >= 'a' && hexdigit <= 'f')
|
||||
value = hexdigit - 'a' + 10;
|
||||
else
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue