Skip to content

Commit

Permalink
clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Li authored and Samuel Li committed Dec 15, 2023
1 parent e999f7e commit 7fcdc7b
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions include/SPECK1D_INT.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class SPECK1D_INT : public SPECK_INT<T> {
// consideration, functions such as m_process_S() and m_process_P() have different signatures
// during decoding/encoding, so they're implemented in their respective subclasses.
//
void m_clean_LIS() final override;
void m_initialize_lists() final override;
void m_clean_LIS() final;
void m_initialize_lists() final;

auto m_partition_set(Set1D) const -> std::array<Set1D, 2>;

Expand Down
2 changes: 1 addition & 1 deletion include/SPECK1D_INT_DEC.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class SPECK1D_INT_DEC final : public SPECK1D_INT<T> {
using SPECK1D_INT<T>::m_LIS;
using SPECK1D_INT<T>::m_partition_set;

void m_sorting_pass() final override;
void m_sorting_pass() final;

void m_process_S(size_t idx1, size_t idx2, size_t& counter, bool read);
void m_process_P(size_t idx, size_t& counter, bool);
Expand Down
2 changes: 1 addition & 1 deletion include/SPECK1D_INT_ENC.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class SPECK1D_INT_ENC final : public SPECK1D_INT<T> {
using SPECK1D_INT<T>::m_LIS;
using SPECK1D_INT<T>::m_partition_set;

void m_sorting_pass() final override;
void m_sorting_pass() final;

void m_process_S(size_t idx1, size_t idx2, SigType, size_t& counter, bool output);
void m_process_P(size_t idx, SigType, size_t& counter, bool output);
Expand Down
6 changes: 3 additions & 3 deletions include/SPECK2D_INT.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ class SPECK2D_INT : public SPECK_INT<T> {
using SPECK_INT<T>::m_coeff_buf;
using SPECK_INT<T>::m_bit_buffer;

void m_sorting_pass() final override;
void m_clean_LIS() final override;
void m_initialize_lists() final override;
void m_sorting_pass() final;
void m_clean_LIS() final;
void m_initialize_lists() final;

void m_code_S(size_t idx1, size_t idx2);
void m_code_I();
Expand Down
6 changes: 3 additions & 3 deletions include/SPECK2D_INT_DEC.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class SPECK2D_INT_DEC final : public SPECK2D_INT<T> {
using SPECK2D_INT<T>::m_code_S;
using SPECK2D_INT<T>::m_code_I;

void m_process_S(size_t idx1, size_t idx2, size_t& counter, bool need_decide) final override;
void m_process_P(size_t idx, size_t& counter, bool need_decide) final override;
void m_process_I(bool need_decide) final override;
void m_process_S(size_t idx1, size_t idx2, size_t& counter, bool need_decide) final;
void m_process_P(size_t idx, size_t& counter, bool need_decide) final;
void m_process_I(bool need_decide) final;
};

}; // namespace sperr
Expand Down
6 changes: 3 additions & 3 deletions include/SPECK2D_INT_ENC.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class SPECK2D_INT_ENC final : public SPECK2D_INT<T> {
using SPECK2D_INT<T>::m_code_S;
using SPECK2D_INT<T>::m_code_I;

void m_process_S(size_t idx1, size_t idx2, size_t& counter, bool need_decide) final override;
void m_process_P(size_t idx, size_t& counter, bool need_decide) final override;
void m_process_I(bool need_decide) final override;
void m_process_S(size_t idx1, size_t idx2, size_t& counter, bool need_decide) final;
void m_process_P(size_t idx, size_t& counter, bool need_decide) final;
void m_process_I(bool need_decide) final;

auto m_decide_S_significance(const Set2D&) const -> bool;
auto m_decide_I_significance() const -> bool;
Expand Down
6 changes: 3 additions & 3 deletions include/SPECK3D_INT.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ class SPECK3D_INT : public SPECK_INT<T> {
using SPECK_INT<T>::m_coeff_buf;
using SPECK_INT<T>::m_bit_buffer;

void m_initialize_lists() final override;
void m_sorting_pass() final override;
void m_clean_LIS() final override;
void m_initialize_lists() final;
void m_sorting_pass() final;
void m_clean_LIS() final;

virtual void m_process_S(size_t idx1, size_t idx2, size_t& counter, bool) = 0;
virtual void m_process_P(size_t i, size_t m, size_t& c, bool) = 0; // Called by `m_code_S()`.
Expand Down
8 changes: 4 additions & 4 deletions include/SPECK3D_INT_DEC.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class SPECK3D_INT_DEC final : public SPECK3D_INT<T> {
using SPECK3D_INT<T>::m_LIS;
using SPECK3D_INT<T>::m_code_S;

void m_process_S(size_t idx1, size_t idx2, size_t& counter, bool read) final override;
void m_process_P(size_t idx, size_t no_use, size_t& counter, bool read) final override;
void m_process_P_lite(size_t idx) final override;
void m_additional_initialization() final override{}; // empty function
void m_process_S(size_t idx1, size_t idx2, size_t& counter, bool read) final;
void m_process_P(size_t idx, size_t no_use, size_t& counter, bool read) final;
void m_process_P_lite(size_t idx) final;
void m_additional_initialization() final {}; // empty function
};

}; // namespace sperr
Expand Down
8 changes: 4 additions & 4 deletions include/SPECK3D_INT_ENC.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ class SPECK3D_INT_ENC final : public SPECK3D_INT<T> {
using SPECK3D_INT<T>::m_partition_S_XYZ;
using SPECK3D_INT<T>::m_code_S;

void m_process_S(size_t idx1, size_t idx2, size_t& counter, bool output) final override;
void m_process_P(size_t idx, size_t morton, size_t& counter, bool output) final override;
void m_process_P_lite(size_t idx) final override;
void m_additional_initialization() final override;
void m_process_S(size_t idx1, size_t idx2, size_t& counter, bool output) final;
void m_process_P(size_t idx, size_t morton, size_t& counter, bool output) final;
void m_process_P_lite(size_t idx) final;
void m_additional_initialization() final;

// Data structures and functions for morton data layout.
vecui_type m_morton_buf;
Expand Down
2 changes: 1 addition & 1 deletion src/SPERR3D_Stream_Tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ auto sperr::SPERR3D_Stream_Tools::progressive_read(std::string filename, unsigne
auto arr20 = std::array<uint8_t, 20>();
std::copy(vec20.cbegin(), vec20.cend(), arr20.begin());
const auto header_len = this->get_header_len(arr20);
const auto header_buf = sperr::read_n_bytes(filename, header_len);
auto header_buf = sperr::read_n_bytes(filename, header_len);
if (header_buf.empty())
return header_buf;

Expand Down
10 changes: 5 additions & 5 deletions src/SPERR_C_API.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ int C_API::sperr_comp_2d(const void* src,
size_t* dst_len)
{
// Examine if `dst` is pointing to a NULL pointer
if (*dst != NULL)
if (*dst != nullptr)
return 1;
if (quality <= 0.0)
return 2;
Expand Down Expand Up @@ -103,7 +103,7 @@ int C_API::sperr_decomp_2d(const void* src,
void** dst)
{
// Examine if `dst` is pointing to a NULL pointer
if (*dst != NULL)
if (*dst != nullptr)
return 1;

// Use a decoder, similar steps as in `utilities/sperr2d.cpp`.
Expand Down Expand Up @@ -168,7 +168,7 @@ int C_API::sperr_comp_3d(const void* src,
size_t* dst_len)
{
// Examine if `dst` is pointing to a NULL pointer
if (*dst != NULL)
if (*dst != nullptr)
return 1;
if (quality <= 0.0)
return 2;
Expand Down Expand Up @@ -225,7 +225,7 @@ int C_API::sperr_decomp_3d(const void* src,
void** dst)
{
// Examine if `dst` is pointing to a NULL pointer.
if (*dst != NULL)
if (*dst != nullptr)
return 1;

// Use a decompressor to decompress this bitstream
Expand Down Expand Up @@ -263,7 +263,7 @@ int C_API::sperr_trunc_3d(const void* src,
void** dst,
size_t* dst_len)
{
if (*dst != NULL)
if (*dst != nullptr)
return 1;

auto tools = sperr::SPERR3D_Stream_Tools();
Expand Down

0 comments on commit 7fcdc7b

Please sign in to comment.