fix: sonarcloud (#2865)

* refactor: implement FileTreeItem::children_ with a std::vector

* fix: std::move should not be called on forwarding reference

* fix: uninitialized scalar variable

* fix: unchecked return value from library

* fix: dereference before null check

* fix: unchecked return value from library

* fix: unchecked return value from library

* fixup! refactor: implement FileTreeItem::children_ with a std::vector

* fix: signed-unsigned comparison in libtransmission tests

* fix: avoid unnecessary copy by using const reference

* fix: function should be declared const

* refactor: use fmt::format to build log timestamps

* fix: use init-statement to reduce variable scope

* fixup! refactor: use fmt::format to build log timestamps

* fix: remove tau_tracker destructor for rule-of-zero

* fix: remove tr_peerIo destructor for rule-of-zero

* Revert "fix: dereference before null check"

This reverts commit cd78967815.

* fix: signed-unsigned comparison in libtransmission tests

* fix: use init-statement to reduce variable scope

* fix: extract nested code block into separate method

* fix: extract nested code block into separate method

* fix: extract nested code block into separate method

* fix: use init-statement to reduce variable scope

* fix: extract nested code block into separate method

* fix: signed-unsigned comparison in libtransmission tests

* fixup! fix: extract nested code block into separate method

* fix: mark possibly-unused as [[maybe_unused]]

* fix: invalid stack memory reference in tr_found_file_t

* fix: signed-unsigned comparison in libtransmission tests
This commit is contained in:
Charles Kerr
2022-04-02 09:06:02 -05:00
committed by GitHub
parent 46cc95f72e
commit 1cc9da26ba
42 changed files with 520 additions and 494 deletions

View File

@@ -6,10 +6,10 @@
#pragma once
#include <cstdint>
#include <vector>
#include <QCoreApplication>
#include <QHash>
#include <QList>
#include <QSet>
#include <QString>
#include <QVariant>
@@ -95,7 +95,7 @@ private:
FileTreeItem* parent_ = {};
QHash<QString, int> child_rows_;
QList<FileTreeItem*> children_;
std::vector<FileTreeItem*> children_;
QString name_;
uint64_t const total_size_ = {};
uint64_t have_size_ = {};