Skip to content

Commit

Permalink
Bump clang format to version 16.0
Browse files Browse the repository at this point in the history
Version is v16.0 is now the default version bundled with VSCode's C/C++
extension as of version 1.15.4. Update the formatting verification via
Github workflow and update the formatting in some files.
  • Loading branch information
igorauad committed Jul 11, 2023
1 parent 727bca9 commit db0ef43
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
- name: Check Python formatting
run: yapf --diff --recursive --verbose apps/ python/
- name: Check C++ formatting
uses: DoozyX/clang-format-lint-action@v0.12
uses: DoozyX/clang-format-lint-action@v0.16.1
with:
clangFormatVersion: 10
clangFormatVersion: 16
6 changes: 3 additions & 3 deletions bench/fec/src/bench_plsc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ struct buffers {
struct utils {
std::unique_ptr<tools::Sigma<>> noise; // a sigma noise type
std::vector<std::unique_ptr<tools::Reporter>>
reporters; // list of reporters displayed on the terminal
reporters; // list of reporters displayed on the terminal
std::unique_ptr<tools::Terminal_std>
terminal; // manage the output text on the terminal
terminal; // manage the output text on the terminal
};

void init_modules(const params& p, modules& m)
Expand Down Expand Up @@ -281,7 +281,7 @@ int main(int argc, char** argv)
buffers b;
init_buffers(p, b); // create and initialize the buffers required by the modules
utils u;
init_utils(m, u); // create and initialize the utils
init_utils(m, u); // create and initialize the utils

// display the legend in the terminal
u.terminal->legend();
Expand Down
2 changes: 1 addition & 1 deletion lib/pi2_bpsk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ uint64_t demap_bpsk_diff(const gr_complex* in, unsigned int N)
throw std::runtime_error("N has to be <= 64");
}

uint64_t bit = 0; // last SOF bit is 0
uint64_t bit = 0; // last SOF bit is 0
uint64_t code = 0;
for (unsigned int j = 0; j < N; j++) { // index of the PLSC symbols only
gr_complex diff = conj(in[j + 1]) * in[j];
Expand Down
16 changes: 8 additions & 8 deletions lib/pl_frame_sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ class DVBS2RX_API frame_sync : public pl_submodule
uint8_t d_unlock_cnt; /**< Count of consecutive frame detection failures */
std::chrono::system_clock::time_point d_lock_time; /**< Frame lock timestamp */

delay_line<gr_complex> d_plsc_delay_buf; /**< Buffer used as delay line */
delay_line<gr_complex> d_sof_buf; /**< SOF correlator buffer */
delay_line<gr_complex> d_plsc_e_buf; /**< Even PLSC correlator buffer */
delay_line<gr_complex> d_plsc_o_buf; /**< Odd PLSC correlator buffer */
cdeque<gr_complex> d_plheader_buf; /**< Buffer to store the PLHEADER symbols */
volk::vector<gr_complex> d_payload_buf; /**< Buffer to store the PLFRAME payload */
volk::vector<gr_complex> d_sof_taps; /**< SOF cross-correlation taps */
volk::vector<gr_complex> d_plsc_taps; /**< PLSC cross-correlation taps */
delay_line<gr_complex> d_plsc_delay_buf; /**< Buffer used as delay line */
delay_line<gr_complex> d_sof_buf; /**< SOF correlator buffer */
delay_line<gr_complex> d_plsc_e_buf; /**< Even PLSC correlator buffer */
delay_line<gr_complex> d_plsc_o_buf; /**< Odd PLSC correlator buffer */
cdeque<gr_complex> d_plheader_buf; /**< Buffer to store the PLHEADER symbols */
volk::vector<gr_complex> d_payload_buf; /**< Buffer to store the PLFRAME payload */
volk::vector<gr_complex> d_sof_taps; /**< SOF cross-correlation taps */
volk::vector<gr_complex> d_plsc_taps; /**< PLSC cross-correlation taps */

/* Timing metric threshold for inferring a start of frame.
*
Expand Down
2 changes: 1 addition & 1 deletion lib/qa_reed_muller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ BOOST_DATA_TEST_CASE(test_reed_muller_codeword_subset, bdata::make({ false, true

// The decoder can only return results within the selected codeword subset
if (i != 0 && i != 32 && i != 64 && i != 96) {
BOOST_CHECK(i != dataword); // i not in the subset
BOOST_CHECK(i != dataword); // i not in the subset
} else {
BOOST_CHECK_EQUAL(dataword, i); // i in the subset
}
Expand Down

0 comments on commit db0ef43

Please sign in to comment.