-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more clang-tidy fixes #299
base: master
Are you sure you want to change the base?
Conversation
Found with modernize-concat-nested-namespaces Signed-off-by: Rosen Penev <[email protected]>
Found with bugprone-assignment-in-if-condition Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
Found with performance-unnecessary-value-param Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
There was a problem hiding this 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/9)
size_type m_size; | ||
size_type m_maxSize; | ||
size_type m_size{0}; | ||
size_type m_maxSize{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_maxSize
size_type m_maxSize{0}; | |
size_type m_max_size{0}; |
|
||
priority_type m_priority; | ||
uint32_t m_sendBufferSize; | ||
uint32_t m_receiveBufferSize; | ||
uint32_t m_sendBufferSize{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_sendBufferSize
uint32_t m_sendBufferSize{0}; | |
uint32_t m_send_buffer_size{0}; |
uint32_t m_sendBufferSize; | ||
uint32_t m_receiveBufferSize; | ||
uint32_t m_sendBufferSize{0}; | ||
uint32_t m_receiveBufferSize{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_receiveBufferSize
uint32_t m_receiveBufferSize{0}; | |
uint32_t m_receive_buffer_size{0}; |
uint32_t m_sizePex; | ||
uint32_t m_maxSizePex; | ||
size_t m_metadataSize; | ||
uint64_t m_uploadedBaseline{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_uploadedBaseline
uint64_t m_uploadedBaseline{0}; | |
uint64_t m_uploaded_baseline{0}; |
uint32_t m_maxSizePex; | ||
size_t m_metadataSize; | ||
uint64_t m_uploadedBaseline{0}; | ||
uint64_t m_completedBaseline{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_completedBaseline
uint64_t m_completedBaseline{0}; | |
uint64_t m_completed_baseline{0}; |
size_t m_metadataSize; | ||
uint64_t m_uploadedBaseline{0}; | ||
uint64_t m_completedBaseline{0}; | ||
uint32_t m_sizePex{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_sizePex
uint32_t m_sizePex{0}; | |
uint32_t m_size_pex{0}; |
uint64_t m_uploadedBaseline{0}; | ||
uint64_t m_completedBaseline{0}; | ||
uint32_t m_sizePex{0}; | ||
uint32_t m_maxSizePex{8}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_maxSizePex
uint32_t m_maxSizePex{8}; | |
uint32_t m_max_size_pex{8}; |
uint64_t m_completedBaseline{0}; | ||
uint32_t m_sizePex{0}; | ||
uint32_t m_maxSizePex{8}; | ||
size_t m_metadataSize{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_metadataSize
size_t m_metadataSize{0}; | |
size_t m_metadata_size{0}; |
|
||
uint32_t m_creationDate; | ||
uint32_t m_creationDate{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_creationDate
uint32_t m_creationDate{0}; | |
uint32_t m_creation_date{0}; |
|
||
char m_sync[20]; | ||
unsigned int m_syncLength; | ||
unsigned int m_syncLength{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_syncLength
unsigned int m_syncLength{0}; | |
unsigned int m_sync_length{0}; |
There was a problem hiding this 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 (2/9)
|
||
unsigned int m_lengthIA; | ||
unsigned int m_lengthIA{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_lengthIA
unsigned int m_lengthIA{0}; | |
unsigned int m_length_ia{0}; |
uint32_t m_notStalled; | ||
|
||
state_type m_state{STATE_INCOMPLETE}; | ||
uint32_t m_notStalled{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_notStalled
uint32_t m_notStalled{0}; | |
uint32_t m_not_stalled{0}; |
|
||
BlockFailed* m_failedList; | ||
BlockFailed* m_failedList{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_failedList
BlockFailed* m_failedList{}; | |
BlockFailed* m_failed_list{}; |
uint32_t m_chunkSize; | ||
int m_prot; | ||
uint32_t m_chunkSize{0}; | ||
int m_prot{~0}; | ||
}; | ||
|
||
inline Chunk::iterator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incomplete type torrent::Chunk
named in nested name specifier
@@ -56,13 +56,7 @@ class lt_cacheline_aligned ChunkListNode { | |||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected expression
@@ -114,8 +114,8 @@ class TransferList : public std::vector<BlockList*> { | |||
|
|||
completed_list_type m_completedList; | |||
|
|||
uint32_t m_succeededCount; | |||
uint32_t m_failedCount; | |||
uint32_t m_succeededCount{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_succeededCount
uint32_t m_succeededCount{0}; | |
uint32_t m_succeeded_count{0}; |
uint32_t m_succeededCount; | ||
uint32_t m_failedCount; | ||
uint32_t m_succeededCount{0}; | ||
uint32_t m_failedCount{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_failedCount
uint32_t m_failedCount{0}; | |
uint32_t m_failed_count{0}; |
@@ -80,11 +80,11 @@ class LIBTORRENT_EXPORT FileManager : private std::vector<File*> { | |||
FileManager(const FileManager&) LIBTORRENT_NO_EXPORT; | |||
void operator = (const FileManager&) LIBTORRENT_NO_EXPORT; | |||
|
|||
size_type m_maxOpenFiles; | |||
size_type m_maxOpenFiles{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_maxOpenFiles
size_type m_maxOpenFiles{0}; | |
size_type m_max_open_files{0}; |
uint64_t m_filesOpenedCounter; | ||
uint64_t m_filesClosedCounter; | ||
uint64_t m_filesFailedCounter; | ||
uint64_t m_filesOpenedCounter{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_filesOpenedCounter
uint64_t m_filesOpenedCounter{0}; | |
uint64_t m_files_opened_counter{0}; |
uint64_t m_filesClosedCounter; | ||
uint64_t m_filesFailedCounter; | ||
uint64_t m_filesOpenedCounter{0}; | ||
uint64_t m_filesClosedCounter{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_filesClosedCounter
uint64_t m_filesClosedCounter{0}; | |
uint64_t m_files_closed_counter{0}; |
There was a problem hiding this 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 (3/9)
uint64_t m_filesFailedCounter; | ||
uint64_t m_filesOpenedCounter{0}; | ||
uint64_t m_filesClosedCounter{0}; | ||
uint64_t m_filesFailedCounter{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_filesFailedCounter
uint64_t m_filesFailedCounter{0}; | |
uint64_t m_files_failed_counter{0}; |
|
||
size_t m_fullCacheLength; | ||
size_t m_fullCacheLength{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_fullCacheLength
size_t m_fullCacheLength{0}; | |
size_t m_full_cache_length{0}; |
PeerInfo* m_peerInfo; | ||
DownloadMain* m_download; | ||
PeerConnectionBase* m_connection; | ||
PeerInfo* m_peerInfo{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_peerInfo
PeerInfo* m_peerInfo{}; | |
PeerInfo* m_peer_info{}; |
|
||
uint8_t m_readType; | ||
uint8_t m_readType{FIRST_INVALID}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_readType
uint8_t m_readType{FIRST_INVALID}; | |
uint8_t m_read_type{FIRST_INVALID}; |
char* m_readPos; | ||
|
||
MessageType m_pendingType; | ||
MessageType m_pendingType{HANDSHAKE}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_pendingType
MessageType m_pendingType{HANDSHAKE}; | |
MessageType m_pending_type{HANDSHAKE}; |
@@ -56,13 +56,7 @@ class lt_cacheline_aligned ChunkListNode { | |||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected expression
@@ -77,7 +77,7 @@ class ThrottleInternal : public Throttle { | |||
SlaveList m_slaveList; | |||
SlaveList::iterator m_nextSlave; | |||
|
|||
uint32_t m_unusedQuota; | |||
uint32_t m_unusedQuota{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_unusedQuota
uint32_t m_unusedQuota{0}; | |
uint32_t m_unused_quota{0}; |
@@ -159,11 +159,11 @@ class LIBTORRENT_EXPORT ResourceManager : | |||
|
|||
int balance_unchoked(unsigned int weight, unsigned int max_unchoked, bool is_up); | |||
|
|||
unsigned int m_currentlyUploadUnchoked; | |||
unsigned int m_currentlyDownloadUnchoked; | |||
unsigned int m_currentlyUploadUnchoked{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_currentlyUploadUnchoked
unsigned int m_currentlyUploadUnchoked{0}; | |
unsigned int m_currently_upload_unchoked{0}; |
unsigned int m_currentlyUploadUnchoked; | ||
unsigned int m_currentlyDownloadUnchoked; | ||
unsigned int m_currentlyUploadUnchoked{0}; | ||
unsigned int m_currentlyDownloadUnchoked{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_currentlyDownloadUnchoked
unsigned int m_currentlyDownloadUnchoked{0}; | |
unsigned int m_currently_download_unchoked{0}; |
|
||
unsigned int m_maxUploadUnchoked; | ||
unsigned int m_maxDownloadUnchoked; | ||
unsigned int m_maxUploadUnchoked{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_maxUploadUnchoked
unsigned int m_maxUploadUnchoked{0}; | |
unsigned int m_max_upload_unchoked{0}; |
There was a problem hiding this 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 (4/9)
unsigned int m_maxUploadUnchoked; | ||
unsigned int m_maxDownloadUnchoked; | ||
unsigned int m_maxUploadUnchoked{0}; | ||
unsigned int m_maxDownloadUnchoked{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_maxDownloadUnchoked
unsigned int m_maxDownloadUnchoked{0}; | |
unsigned int m_max_download_unchoked{0}; |
PeerInfo* m_peerInfo; | ||
DownloadMain* m_download; | ||
PeerInfo* m_peerInfo{}; | ||
DownloadMain* m_download{}; | ||
Bitfield m_bitfield; | ||
|
||
ThrottleList* m_uploadThrottle; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unknown type name ThrottleList
; did you mean Throttle
?
ThrottleList* m_uploadThrottle; | |
Throttle* m_uploadThrottle; |
ThrottleList* m_throttle; | ||
State m_state{IDLE}; | ||
Protocol m_lastCommand{NONE}; | ||
ThrottleList* m_throttle{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unknown type name ThrottleList
; did you mean Throttle
?
ThrottleList* m_throttle{}; | |
Throttle* m_throttle{}; |
uint32_t size_unchoked() const { return m_currently_unchoked; } | ||
uint32_t size_queued() const { return m_currently_queued; } | ||
uint32_t size_total() const { return size_unchoked() + size_queued(); } | ||
m_maxUnchoked(unlimited) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_maxUnchoked
m_maxUnchoked(unlimited) {} | |
m_max_unchoked(unlimited) {} |
bool is_full() const { return !is_unlimited() && size_unchoked() >= m_maxUnchoked; } | ||
bool is_unlimited() const { return m_maxUnchoked == unlimited; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_maxUnchoked
bool is_full() const { return !is_unlimited() && size_unchoked() >= m_maxUnchoked; } | |
bool is_unlimited() const { return m_maxUnchoked == unlimited; } | |
bool is_full() const { return !is_unlimited() && size_unchoked() >= m_max_unchoked; } | |
bool is_unlimited() const { return m_max_unchoked == unlimited; } |
uint32_t max_unchoked() const { return m_maxUnchoked; } | ||
int32_t max_unchoked_signed() const { return m_maxUnchoked; } | ||
void set_max_unchoked(uint32_t v) { m_maxUnchoked = v; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_maxUnchoked
uint32_t max_unchoked() const { return m_maxUnchoked; } | |
int32_t max_unchoked_signed() const { return m_maxUnchoked; } | |
void set_max_unchoked(uint32_t v) { m_maxUnchoked = v; } | |
uint32_t max_unchoked() const { return m_max_unchoked; } | |
int32_t max_unchoked_signed() const { return m_max_unchoked; } | |
void set_max_unchoked(uint32_t v) { m_max_unchoked = v; } |
slot_unchoke m_slotUnchoke; | ||
slot_can_unchoke m_slotCanUnchoke; | ||
slot_connection m_slotConnection; | ||
uint32_t m_maxUnchoked; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_maxUnchoked
uint32_t m_maxUnchoked; | |
uint32_t m_max_unchoked; |
|
||
void modify_currently_queued(int value) { m_currently_queued += value; } | ||
void modify_currently_unchoked(int value) { m_currently_unchoked += value; } | ||
void set_slot_unchoke(slot_unchoke s) { m_slotUnchoke = std::move(s); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_slotUnchoke
void set_slot_unchoke(slot_unchoke s) { m_slotUnchoke = std::move(s); } | |
void set_slot_unchoke(slot_unchoke s) { m_slot_unchoke = std::move(s); } |
uint32_t m_currently_queued{0}; | ||
uint32_t m_currently_unchoked{0}; | ||
|
||
slot_unchoke m_slotUnchoke; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_slotUnchoke
slot_unchoke m_slotUnchoke; | |
slot_unchoke m_slot_unchoke; |
void modify_currently_queued(int value) { m_currently_queued += value; } | ||
void modify_currently_unchoked(int value) { m_currently_unchoked += value; } | ||
void set_slot_unchoke(slot_unchoke s) { m_slotUnchoke = std::move(s); } | ||
void set_slot_can_unchoke(slot_can_unchoke s) { m_slotCanUnchoke = std::move(s); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_slotCanUnchoke
void set_slot_can_unchoke(slot_can_unchoke s) { m_slotCanUnchoke = std::move(s); } | |
void set_slot_can_unchoke(slot_can_unchoke s) { m_slot_can_unchoke = std::move(s); } |
There was a problem hiding this 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 (5/9)
uint32_t m_currently_unchoked{0}; | ||
|
||
slot_unchoke m_slotUnchoke; | ||
slot_can_unchoke m_slotCanUnchoke; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_slotCanUnchoke
slot_can_unchoke m_slotCanUnchoke; | |
slot_can_unchoke m_slot_can_unchoke; |
void modify_currently_unchoked(int value) { m_currently_unchoked += value; } | ||
void set_slot_unchoke(slot_unchoke s) { m_slotUnchoke = std::move(s); } | ||
void set_slot_can_unchoke(slot_can_unchoke s) { m_slotCanUnchoke = std::move(s); } | ||
void set_slot_connection(slot_connection s) { m_slotConnection = std::move(s); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_slotConnection
void set_slot_connection(slot_connection s) { m_slotConnection = std::move(s); } | |
void set_slot_connection(slot_connection s) { m_slot_connection = std::move(s); } |
|
||
slot_unchoke m_slotUnchoke; | ||
slot_can_unchoke m_slotCanUnchoke; | ||
slot_connection m_slotConnection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_slotConnection
slot_connection m_slotConnection; | |
slot_connection m_slot_connection; |
@@ -94,7 +92,7 @@ class AvailableList : private std::vector<rak::socket_address> { | |||
AddressList* buffer() { return &m_buffer; } | |||
|
|||
private: | |||
size_type m_maxSize; | |||
size_type m_maxSize{1000}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_maxSize
size_type m_maxSize{1000}; | |
size_type m_max_size{1000}; |
@@ -146,10 +146,10 @@ class LIBTORRENT_EXPORT FileList : private std::vector<File*> { | |||
|
|||
download_data m_data; | |||
|
|||
bool m_isOpen; | |||
bool m_isOpen{false}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_isOpen
bool m_isOpen{false}; | |
bool m_is_open{false}; |
|
||
uint64_t m_torrentSize; | ||
uint32_t m_chunkSize; | ||
uint64_t m_torrentSize{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_torrentSize
uint64_t m_torrentSize{0}; | |
uint64_t m_torrent_size{0}; |
uint64_t m_torrentSize; | ||
uint32_t m_chunkSize; | ||
uint64_t m_torrentSize{0}; | ||
uint32_t m_chunkSize{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_chunkSize
uint32_t m_chunkSize{0}; | |
uint32_t m_chunk_size{0}; |
@@ -147,8 +147,8 @@ class LIBTORRENT_EXPORT ConnectionList : private std::vector<Peer*> { | |||
|
|||
DownloadMain* m_download; | |||
|
|||
size_type m_minSize; | |||
size_type m_maxSize; | |||
size_type m_minSize{50}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_minSize
size_type m_minSize{50}; | |
size_type m_min_size{50}; |
size_type m_minSize; | ||
size_type m_maxSize; | ||
size_type m_minSize{50}; | ||
size_type m_maxSize{100}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_maxSize
size_type m_maxSize{100}; | |
size_type m_max_size{100}; |
Delegator* m_delegator; | ||
PeerChunks* m_peerChunks; | ||
Delegator* m_delegator{}; | ||
PeerChunks* m_peerChunks{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_peerChunks
PeerChunks* m_peerChunks{}; | |
PeerChunks* m_peer_chunks{}; |
There was a problem hiding this 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 (6/9)
@@ -88,9 +88,9 @@ class PeerChunks { | |||
const ThrottleNode* upload_throttle() const { return &m_uploadThrottle; } | |||
|
|||
private: | |||
PeerInfo* m_peerInfo; | |||
PeerInfo* m_peerInfo{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_peerInfo
PeerInfo* m_peerInfo{}; | |
PeerInfo* m_peer_info{}; |
|
||
bool m_usingCounter; | ||
bool m_usingCounter{false}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_usingCounter
bool m_usingCounter{false}; | |
bool m_using_counter{false}; |
@@ -76,7 +76,7 @@ class DownloadConstructor { | |||
void parse_single_file(const Object& b, uint32_t chunkSize); | |||
void parse_multi_files(const Object& b, uint32_t chunkSize); | |||
|
|||
inline Path create_path(const Object::list_type& plist, const std::string enc); | |||
inline Path create_path(const Object::list_type& plist, const std::string& enc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incomplete type torrent::Object
named in nested name specifier
@@ -59,9 +57,9 @@ class EncryptionInfo { | |||
void set_decrypt(const RC4& decrypt) { m_decrypt = decrypt; m_decryptValid = true; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_decryptValid
void set_decrypt(const RC4& decrypt) { m_decrypt = decrypt; m_decryptValid = true; } | |
void set_decrypt(const RC4& decrypt) { m_decrypt = decrypt; m_decrypt_valid = true; } |
bool m_decryptValid; | ||
bool m_encrypted{false}; | ||
bool m_obfuscated{false}; | ||
bool m_decryptValid{false}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_decryptValid
bool m_decryptValid{false}; | |
bool m_decrypt_valid{false}; |
@@ -187,7 +187,7 @@ class DhtServer : public SocketDatagram { | |||
unsigned int m_errorsReceived; | |||
unsigned int m_errorsCaught; | |||
|
|||
bool m_networkUp; | |||
bool m_networkUp{false}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_networkUp
bool m_networkUp{false}; | |
bool m_network_up{false}; |
port_type m_port; | ||
|
||
int m_portSent; | ||
bool m_canReceive; | ||
int m_portSent{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_portSent
int m_portSent{0}; | |
int m_port_sent{0}; |
int m_portSent; | ||
bool m_canReceive; | ||
int m_portSent{0}; | ||
bool m_canReceive{true}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_canReceive
bool m_canReceive{true}; | |
bool m_can_receive{true}; |
|
||
int64_t m_timeLastChoke; | ||
int64_t m_timeLastChoke{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_timeLastChoke
int64_t m_timeLastChoke{0}; | |
int64_t m_time_last_choke{0}; |
@@ -74,10 +74,10 @@ class InitialSeeding { | |||
void complete(PeerConnectionBase* pcb); | |||
void unblock_all(); | |||
|
|||
uint32_t m_nextChunk; | |||
uint32_t m_nextChunk{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_nextChunk
uint32_t m_nextChunk{0}; | |
uint32_t m_next_chunk{0}; |
There was a problem hiding this 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 (7/9)
uint32_t m_chunksLeft; | ||
DownloadMain* m_download; | ||
PeerInfo** m_peerChunks; | ||
std::unique_ptr<PeerInfo*[]> m_peerChunks; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_peerChunks
std::unique_ptr<PeerInfo*[]> m_peerChunks; | |
std::unique_ptr<PeerInfo*[]> m_peer_chunks; |
|
||
int m_numRefresh; | ||
int m_numRefresh{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_numRefresh
int m_numRefresh{0}; | |
int m_num_refresh{0}; |
uint32_t m_transferCounter; | ||
uint32_t m_lastConnection; | ||
uint32_t m_lastHandshake; | ||
uint32_t m_failedCounter{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_failedCounter
uint32_t m_failedCounter{0}; | |
uint32_t m_failed_counter{0}; |
uint32_t m_lastConnection; | ||
uint32_t m_lastHandshake; | ||
uint32_t m_failedCounter{0}; | ||
uint32_t m_transferCounter{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_transferCounter
uint32_t m_transferCounter{0}; | |
uint32_t m_transfer_counter{0}; |
uint32_t m_lastHandshake; | ||
uint32_t m_failedCounter{0}; | ||
uint32_t m_transferCounter{0}; | ||
uint32_t m_lastConnection{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_lastConnection
uint32_t m_lastConnection{0}; | |
uint32_t m_last_connection{0}; |
uint32_t m_failedCounter{0}; | ||
uint32_t m_transferCounter{0}; | ||
uint32_t m_lastConnection{0}; | ||
uint32_t m_lastHandshake{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_lastHandshake
uint32_t m_lastHandshake{0}; | |
uint32_t m_last_handshake{0}; |
|
||
uint16_t m_listenPort; | ||
uint16_t m_listenPort{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_listenPort
uint16_t m_listenPort{0}; | |
uint16_t m_listen_port{0}; |
Object* m_bencode; | ||
HashTorrent* m_hashChecker; | ||
Object* m_bencode{}; | ||
HashTorrent* m_hashChecker{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_hashChecker
HashTorrent* m_hashChecker{}; | |
HashTorrent* m_hash_checker{}; |
HashQueue* m_hashQueue; | ||
|
||
std::string m_hash; | ||
|
||
int m_connectionType; | ||
int m_connectionType{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_connectionType
int m_connectionType{0}; | |
int m_connection_type{0}; |
@@ -56,13 +56,7 @@ class lt_cacheline_aligned ChunkListNode { | |||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected expression
There was a problem hiding this 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 (8/9)
|
||
uint32_t m_action; | ||
uint64_t m_connectionId; | ||
uint32_t m_transactionId; | ||
|
||
ReadBuffer* m_readBuffer; | ||
WriteBuffer* m_writeBuffer; | ||
ReadBuffer* m_readBuffer{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_readBuffer
ReadBuffer* m_readBuffer{}; | |
ReadBuffer* m_read_buffer{}; |
ReadBuffer* m_readBuffer; | ||
WriteBuffer* m_writeBuffer; | ||
ReadBuffer* m_readBuffer{}; | ||
WriteBuffer* m_writeBuffer{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_writeBuffer
WriteBuffer* m_writeBuffer{}; | |
WriteBuffer* m_write_buffer{}; |
uint32_t m_chunkSize; | ||
int m_prot; | ||
uint32_t m_chunkSize{0}; | ||
int m_prot{~0}; | ||
}; | ||
|
||
inline Chunk::iterator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chunk
is not a class, namespace, or enumeration
|
||
bool m_bySeeder; | ||
bool m_bySeeder{false}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_bySeeder
bool m_bySeeder{false}; | |
bool m_by_seeder{false}; |
uint32_t m_outstandingQuota; | ||
uint32_t m_unallocatedQuota; | ||
uint32_t m_unusedUnthrottledQuota; | ||
uint32_t m_outstandingQuota{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_outstandingQuota
uint32_t m_outstandingQuota{0}; | |
uint32_t m_outstanding_quota{0}; |
uint32_t m_unallocatedQuota; | ||
uint32_t m_unusedUnthrottledQuota; | ||
uint32_t m_outstandingQuota{0}; | ||
uint32_t m_unallocatedQuota{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_unallocatedQuota
uint32_t m_unallocatedQuota{0}; | |
uint32_t m_unallocated_quota{0}; |
uint32_t m_unusedUnthrottledQuota; | ||
uint32_t m_outstandingQuota{0}; | ||
uint32_t m_unallocatedQuota{0}; | ||
uint32_t m_unusedUnthrottledQuota{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_unusedUnthrottledQuota
uint32_t m_unusedUnthrottledQuota{0}; | |
uint32_t m_unused_unthrottled_quota{0}; |
|
||
uint32_t m_rateAdded; | ||
uint32_t m_rateAdded{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_rateAdded
uint32_t m_rateAdded{0}; | |
uint32_t m_rate_added{0}; |
@@ -148,24 +148,24 @@ class LIBTORRENT_EXPORT ChunkManager : private std::vector<ChunkList*> { | |||
|
|||
void sync_all(int flags, uint64_t target) LIBTORRENT_NO_EXPORT; | |||
|
|||
uint64_t m_memoryUsage; | |||
uint64_t m_memoryUsage{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_memoryUsage
uint64_t m_memoryUsage{0}; | |
uint64_t m_memory_usage{0}; |
uint64_t m_maxMemoryUsage; | ||
|
||
uint32_t m_memoryBlockCount; | ||
uint32_t m_memoryBlockCount{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_memoryBlockCount
uint32_t m_memoryBlockCount{0}; | |
uint32_t m_memory_block_count{0}; |
There was a problem hiding this 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 (9/9)
bool m_safeSync; | ||
uint32_t m_timeoutSync; | ||
uint32_t m_timeoutSafeSync; | ||
bool m_safeSync{false}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_safeSync
bool m_safeSync{false}; | |
bool m_safe_sync{false}; |
uint32_t m_timeoutSync; | ||
uint32_t m_timeoutSafeSync; | ||
bool m_safeSync{false}; | ||
uint32_t m_timeoutSync{600}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_timeoutSync
uint32_t m_timeoutSync{600}; | |
uint32_t m_timeout_sync{600}; |
uint32_t m_timeoutSafeSync; | ||
bool m_safeSync{false}; | ||
uint32_t m_timeoutSync{600}; | ||
uint32_t m_timeoutSafeSync{900}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_timeoutSafeSync
uint32_t m_timeoutSafeSync{900}; | |
uint32_t m_timeout_safe_sync{900}; |
|
||
uint32_t m_preloadType; | ||
uint32_t m_preloadType{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_preloadType
uint32_t m_preloadType{0}; | |
uint32_t m_preload_type{0}; |
uint32_t m_preloadMinSize; | ||
uint32_t m_preloadRequiredRate; | ||
|
||
uint32_t m_statsPreloaded; | ||
uint32_t m_statsNotPreloaded; | ||
uint32_t m_statsPreloaded{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_statsPreloaded
uint32_t m_statsPreloaded{0}; | |
uint32_t m_stats_preloaded{0}; |
uint32_t m_statsPreloaded; | ||
uint32_t m_statsNotPreloaded; | ||
uint32_t m_statsPreloaded{0}; | ||
uint32_t m_statsNotPreloaded{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_statsNotPreloaded
uint32_t m_statsNotPreloaded{0}; | |
uint32_t m_stats_not_preloaded{0}; |
|
||
int32_t m_timerStarved; | ||
size_type m_lastFreed; | ||
int32_t m_timerStarved{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_timerStarved
int32_t m_timerStarved{0}; | |
int32_t m_timer_starved{0}; |
int32_t m_timerStarved; | ||
size_type m_lastFreed; | ||
int32_t m_timerStarved{0}; | ||
size_type m_lastFreed{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid case style for private member m_lastFreed
size_type m_lastFreed{0}; | |
size_type m_last_freed{0}; |
uint32_t m_chunkSize; | ||
int m_prot; | ||
uint32_t m_chunkSize{0}; | ||
int m_prot{~0}; | ||
}; | ||
|
||
inline Chunk::iterator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chunk
is not a class, namespace, or enumeration
@@ -56,13 +56,7 @@ class lt_cacheline_aligned ChunkListNode { | |||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected expression
That m_peerChunks unique_ptr looks like it should be a vector IMO. |
This is too much to review for no real immediate benefit. While I want code converted as new PR's touch upon them, going through this much just for syntactical cleanup is not worth it. |
I could reduce the commit count if you want. |
Won't change the fact that most of those changes are not worth the time reviewing. |
No description provided.