mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-04 06:32:29 -06:00
Initialize member variables
This commit is contained in:
@@ -41,7 +41,6 @@ using namespace std::chrono_literals;
|
||||
|
||||
BandwidthScheduler::BandwidthScheduler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_lastAlternative(false)
|
||||
{
|
||||
connect(&m_timer, &QTimer::timeout, this, &BandwidthScheduler::onTimeout);
|
||||
}
|
||||
|
||||
@@ -49,5 +49,5 @@ private:
|
||||
void onTimeout();
|
||||
|
||||
QTimer m_timer;
|
||||
bool m_lastAlternative;
|
||||
bool m_lastAlternative = false;
|
||||
};
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace
|
||||
}
|
||||
|
||||
private:
|
||||
lt::address_v4::bytes_type m_buf;
|
||||
lt::address_v4::bytes_type m_buf {};
|
||||
};
|
||||
|
||||
bool parseIPAddress(const char *data, lt::address &address)
|
||||
@@ -111,7 +111,6 @@ namespace
|
||||
|
||||
FilterParserThread::FilterParserThread(QObject *parent)
|
||||
: QThread(parent)
|
||||
, m_abort(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ private:
|
||||
int getlineInStream(QDataStream &stream, std::string &name, char delim);
|
||||
int parseP2BFilterFile();
|
||||
|
||||
bool m_abort;
|
||||
bool m_abort = false;
|
||||
Path m_filePath;
|
||||
lt::ip_filter m_filter;
|
||||
};
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace BitTorrent
|
||||
bool firstLastPiecePriority = false;
|
||||
bool hasFinishedStatus = false;
|
||||
bool stopped = false;
|
||||
Torrent::StopCondition stopCondition;
|
||||
Torrent::StopCondition stopCondition = Torrent::StopCondition::None;
|
||||
|
||||
bool addToQueueTop = false; // only for new torrents
|
||||
|
||||
|
||||
@@ -75,8 +75,7 @@ using namespace BitTorrent;
|
||||
const int magnetUriId = qRegisterMetaType<MagnetUri>();
|
||||
|
||||
MagnetUri::MagnetUri(const QString &source)
|
||||
: m_valid(false)
|
||||
, m_url(source)
|
||||
: m_url(source)
|
||||
{
|
||||
if (source.isEmpty()) return;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace BitTorrent
|
||||
lt::add_torrent_params addTorrentParams() const;
|
||||
|
||||
private:
|
||||
bool m_valid;
|
||||
bool m_valid = false;
|
||||
QString m_url;
|
||||
InfoHash m_infoHash;
|
||||
QString m_name;
|
||||
|
||||
@@ -482,15 +482,15 @@ namespace BitTorrent
|
||||
{
|
||||
lt::torrent_handle torrentHandle;
|
||||
Path path;
|
||||
MoveStorageMode mode;
|
||||
MoveStorageContext context;
|
||||
MoveStorageMode mode {};
|
||||
MoveStorageContext context {};
|
||||
};
|
||||
|
||||
struct RemovingTorrentData
|
||||
{
|
||||
QString name;
|
||||
Path pathToRemove;
|
||||
DeleteOption deleteOption;
|
||||
DeleteOption deleteOption {};
|
||||
};
|
||||
|
||||
explicit SessionImpl(QObject *parent = nullptr);
|
||||
|
||||
@@ -46,14 +46,14 @@ namespace BitTorrent
|
||||
|
||||
struct TorrentCreatorParams
|
||||
{
|
||||
bool isPrivate;
|
||||
bool isPrivate = false;
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
TorrentFormat torrentFormat;
|
||||
TorrentFormat torrentFormat = TorrentFormat::Hybrid;
|
||||
#else
|
||||
bool isAlignmentOptimized;
|
||||
int paddedFileSizeLimit;
|
||||
#endif
|
||||
int pieceSize;
|
||||
int pieceSize = 0;
|
||||
Path inputPath;
|
||||
Path savePath;
|
||||
QString comment;
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace BitTorrent
|
||||
struct FileErrorInfo
|
||||
{
|
||||
lt::error_code error;
|
||||
lt::operation_t operation;
|
||||
lt::operation_t operation = lt::operation_t::unknown;
|
||||
};
|
||||
|
||||
class TorrentImpl final : public Torrent
|
||||
|
||||
Reference in New Issue
Block a user