Skip to content

Conversation

@neheb
Copy link
Contributor

@neheb neheb commented Jul 20, 2025

No description provided.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

inline void fill_write_buffer();

uint32_t m_skipLength;
uint32_t m_skipLength{};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for private member m_skipLength

Suggested change
uint32_t m_skipLength{};
uint32_t m_skip_length{};

@neheb neheb force-pushed the cppc branch 2 times, most recently from b5e9fed to c673cba Compare July 29, 2025 21:56
inline DataBuffer
DataBuffer::release() {
set_data(nullptr, 0, false);
return *this;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes behavior.


memcpy(m_pending.end(), buffer + (piece << metadata_piece_shift), length);
m_pending.set(m_pending.data(), m_pending.end() + length, m_pending.owned());
m_pending.set_data(m_pending.data(), length, m_pending.owned());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect lenght.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

const char*
strerror(int err) {
if (err < 0 || err > e_last)
if (err < 0 || err >= e_last)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect, we use e_last+1 above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.

Found with useStlAlgorithm

Signed-off-by: Rosen Penev <rosenp@gmail.com>
No need to specify the typename.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Found with derefInvalidIteratorRedundantCheck

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Found with derefInvalidIterator

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Found with noConstructor

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Avoids having to pass nullptr.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants