Skip to content

Commit

Permalink
Clang formatting updated to 17
Browse files Browse the repository at this point in the history
- Keeping up with the rest of the project using a c++17
  • Loading branch information
Carlos Cabanero committed Apr 10, 2024
1 parent 1105d48 commit 67249bb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: clang-format-lint

on: [pull_request]
on: [push, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.16.2
- uses: DoozyX/clang-format-lint-action@v0.17
with:
source: './src'
style: file
clangFormatVersion: 14
clangFormatVersion: 15
2 changes: 1 addition & 1 deletion src/crypto/base64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void base64_encode( const uint8_t* raw, const size_t raw_len, char* b64, const s
b64[0] = table[( bytes >> 18 ) & 0x3f];
b64[1] = table[( bytes >> 12 ) & 0x3f];
b64[2] = table[( bytes >> 6 ) & 0x3f];
b64[3] = table[(bytes)&0x3f];
b64[3] = table[( bytes ) & 0x3f];
raw += 3;
b64 += 4;
}
Expand Down
4 changes: 2 additions & 2 deletions src/crypto/byteorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ inline uint64_t htobe64( uint64_t x )
static_cast<uint8_t>( ( x >> 24 ) & 0xFF ),
static_cast<uint8_t>( ( x >> 16 ) & 0xFF ),
static_cast<uint8_t>( ( x >> 8 ) & 0xFF ),
static_cast<uint8_t>( (x)&0xFF ) };
static_cast<uint8_t>( ( x ) & 0xFF ) };
union {
const uint8_t* p8;
const uint64_t* p64;
Expand All @@ -102,7 +102,7 @@ inline uint64_t be64toh( uint64_t x )

inline uint16_t htobe16( uint16_t x )
{
uint8_t xs[2] = { static_cast<uint8_t>( ( x >> 8 ) & 0xFF ), static_cast<uint8_t>( (x)&0xFF ) };
uint8_t xs[2] = { static_cast<uint8_t>( ( x >> 8 ) & 0xFF ), static_cast<uint8_t>( ( x ) & 0xFF ) };
union {
const uint8_t* p8;
const uint16_t* p16;
Expand Down
5 changes: 1 addition & 4 deletions src/util/select.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,7 @@ class Select
return rv;
}

static void set_verbose( unsigned int s_verbose )
{
verbose = s_verbose;
}
static void set_verbose( unsigned int s_verbose ) { verbose = s_verbose; }

private:
static const int MAX_SIGNAL_NUMBER = 64;
Expand Down

0 comments on commit 67249bb

Please sign in to comment.