Skip to content

Commit

Permalink
[clang-tidy] Temporary suppress some hits generated by "cppcoreguidel…
Browse files Browse the repository at this point in the history
…ines-avoid-const-or-ref-data-members" (#1143)
  • Loading branch information
kiselik authored Mar 5, 2025
1 parent b86778f commit 948ee13
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion sources/middle-layer/common/linear_allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class linear_allocator {
}

private:
allocation_buffer_t& buffer_;
allocation_buffer_t& buffer_; //NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
};

template <class T, class U>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class deflate_state_builder<execution_path_t::hardware> {

private:
state_type state_;
const qpl::ml::util::linear_allocator& allocator_;
const qpl::ml::util::linear_allocator& allocator_; //NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)

explicit deflate_state_builder(const qpl::ml::util::linear_allocator& allocator, bool init_compress_body) noexcept
: state_(allocator, init_compress_body), allocator_(allocator) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class deflate_state<execution_path_t::hardware> final {
// Verify State
hw_iaa_aecs_analytic* aecs_verify_ = nullptr;

const util::linear_allocator& allocator_;
const util::linear_allocator& allocator_; //NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)

protected:
explicit deflate_state(const qpl::ml::util::linear_allocator& allocator, bool init_compress_body)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class deflate_state<execution_path_t::software> final : public compression_strea
qpl_compression_huffman_table* compression_table_ = nullptr;

// Other
const util::linear_allocator& allocator_;
const util::linear_allocator& allocator_; //NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)

explicit deflate_state(const util::linear_allocator& allocator)
: isal_stream_ptr_(allocator.allocate<isal_zstream>()), allocator_(allocator) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class huffman_only_state<execution_path_t::software> {
bool is_verification_enabled_ = false;

// Other
const util::linear_allocator& allocator_;
const util::linear_allocator& allocator_; //NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)

explicit huffman_only_state(const util::linear_allocator& allocator) noexcept : allocator_(allocator) {
isal_stream_ptr_ = allocator_.allocate<isal_zstream>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class huffman_only_compression_state_builder<execution_path_t::software> {

private:
huffman_only_state<execution_path_t::software> stream_;
const qpl::ml::util::linear_allocator& allocator_;
const qpl::ml::util::linear_allocator& allocator_; //NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
};

template <>
Expand Down Expand Up @@ -90,7 +90,7 @@ class huffman_only_compression_state_builder<execution_path_t::hardware> {

private:
huffman_only_state<execution_path_t::hardware> stream_;
const qpl::ml::util::linear_allocator& allocator_;
const qpl::ml::util::linear_allocator& allocator_; //NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
};

// ------ Software ------ //
Expand Down
2 changes: 1 addition & 1 deletion sources/middle-layer/compression/inflate/inflate_state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class inflate_state<execution_path_t::hardware> {
deflate_block_type_e block_type;
};

const util::linear_allocator& allocator_;
const util::linear_allocator& allocator_; //NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
execution_state* execution_state_ptr;
decompression_state_t* decompression_state_ptr;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct GzHuffmanTriplet {
};

class HuffmanOnlyNoErrorConfigurator : public TestConfigurator {
GenDecompressionHuffmanTable& m_huffmanTable;
GenDecompressionHuffmanTable& m_huffmanTable; //NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)

public:
HuffmanOnlyNoErrorConfigurator(Gen32u seed, GenDecompressionHuffmanTable& table, bool is_aecs_format2_expected)
Expand Down

0 comments on commit 948ee13

Please sign in to comment.