mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-04 14:42:29 -06:00
Initialize pointer to a default value
This commit is contained in:
@@ -76,13 +76,7 @@ struct DataFieldDescriptor
|
||||
};
|
||||
|
||||
GeoIPDatabase::GeoIPDatabase(const quint32 size)
|
||||
: m_ipVersion(0)
|
||||
, m_recordSize(0)
|
||||
, m_nodeCount(0)
|
||||
, m_nodeSize(0)
|
||||
, m_indexSize(0)
|
||||
, m_recordBytes(0)
|
||||
, m_size(size)
|
||||
: m_size(size)
|
||||
, m_data(new uchar[size])
|
||||
{
|
||||
}
|
||||
|
||||
@@ -73,16 +73,16 @@ private:
|
||||
template <typename T> QVariant readPlainValue(quint32 &offset, quint8 len) const;
|
||||
|
||||
// Metadata
|
||||
quint16 m_ipVersion;
|
||||
quint16 m_recordSize;
|
||||
quint32 m_nodeCount;
|
||||
int m_nodeSize;
|
||||
int m_indexSize;
|
||||
int m_recordBytes;
|
||||
quint16 m_ipVersion = 0;
|
||||
quint16 m_recordSize = 0;
|
||||
quint32 m_nodeCount = 0;
|
||||
int m_nodeSize = 0;
|
||||
int m_indexSize = 0;
|
||||
int m_recordBytes = 0;
|
||||
QDateTime m_buildEpoch;
|
||||
QString m_dbType;
|
||||
// Search data
|
||||
mutable QHash<quint32, QString> m_countries;
|
||||
quint32 m_size;
|
||||
uchar *m_data;
|
||||
quint32 m_size = 0;
|
||||
uchar *m_data = nullptr;
|
||||
};
|
||||
|
||||
@@ -54,8 +54,6 @@ using namespace Net;
|
||||
GeoIPManager *GeoIPManager::m_instance = nullptr;
|
||||
|
||||
GeoIPManager::GeoIPManager()
|
||||
: m_enabled(false)
|
||||
, m_geoIPDatabase(nullptr)
|
||||
{
|
||||
configure();
|
||||
connect(Preferences::instance(), &Preferences::changed, this, &GeoIPManager::configure);
|
||||
|
||||
@@ -66,8 +66,8 @@ namespace Net
|
||||
void manageDatabaseUpdate();
|
||||
void downloadDatabaseFile();
|
||||
|
||||
bool m_enabled;
|
||||
GeoIPDatabase *m_geoIPDatabase;
|
||||
bool m_enabled = false;
|
||||
GeoIPDatabase *m_geoIPDatabase = nullptr;
|
||||
|
||||
static GeoIPManager *m_instance;
|
||||
};
|
||||
|
||||
@@ -103,9 +103,6 @@ using namespace Net;
|
||||
|
||||
Smtp::Smtp(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_state(Init)
|
||||
, m_useSsl(false)
|
||||
, m_authType(AuthPlain)
|
||||
{
|
||||
static bool needToRegisterMetaType = true;
|
||||
|
||||
|
||||
@@ -103,18 +103,18 @@ namespace Net
|
||||
|
||||
QByteArray m_message;
|
||||
#ifndef QT_NO_OPENSSL
|
||||
QSslSocket *m_socket;
|
||||
QSslSocket *m_socket = nullptr;
|
||||
#else
|
||||
QTcpSocket *m_socket;
|
||||
QTcpSocket *m_socket = nullptr;
|
||||
#endif
|
||||
QString m_from;
|
||||
QString m_rcpt;
|
||||
QString m_response;
|
||||
int m_state;
|
||||
int m_state = Init;
|
||||
QHash<QString, QString> m_extensions;
|
||||
QByteArray m_buffer;
|
||||
bool m_useSsl;
|
||||
AuthType m_authType;
|
||||
bool m_useSsl = false;
|
||||
AuthType m_authType = AuthPlain;
|
||||
QString m_username;
|
||||
QString m_password;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user