mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-13 21:52:30 +00:00
clang-tidy: use default member init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Jari Sundell
parent
3ab38583b8
commit
897a6face2
@@ -21,9 +21,7 @@ curl_get_receive_write(void* data, size_t size, size_t nmemb, void* handle) {
|
||||
}
|
||||
|
||||
CurlGet::CurlGet(CurlStack* s) :
|
||||
m_active(false),
|
||||
m_handle(NULL),
|
||||
m_stack(s) {
|
||||
m_stack(s) {
|
||||
|
||||
m_task_timeout.slot() = [this]() { receive_timeout(); };
|
||||
}
|
||||
|
||||
+2
-2
@@ -40,12 +40,12 @@ private:
|
||||
|
||||
void receive_timeout();
|
||||
|
||||
bool m_active;
|
||||
bool m_active{};
|
||||
bool m_ipv6;
|
||||
|
||||
torrent::utils::SchedulerEntry m_task_timeout;
|
||||
|
||||
CURL* m_handle;
|
||||
CURL* m_handle{};
|
||||
CurlStack* m_stack;
|
||||
};
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ namespace core {
|
||||
|
||||
class DhtManager {
|
||||
public:
|
||||
DhtManager() : m_warned(false), m_start(dht_off) { }
|
||||
~DhtManager();
|
||||
|
||||
void load_dht_cache();
|
||||
@@ -46,9 +45,9 @@ private:
|
||||
torrent::utils::SchedulerEntry m_update_timeout;
|
||||
torrent::utils::SchedulerEntry m_stop_timeout;
|
||||
|
||||
bool m_warned;
|
||||
bool m_warned{};
|
||||
|
||||
int m_start;
|
||||
int m_start{dht_off};
|
||||
std::string m_throttleName;
|
||||
};
|
||||
|
||||
|
||||
@@ -18,11 +18,7 @@
|
||||
namespace core {
|
||||
|
||||
Download::Download(download_type d) :
|
||||
m_download(d),
|
||||
m_hashFailed(false),
|
||||
|
||||
m_resumeFlags(~uint32_t()),
|
||||
m_group(0) {
|
||||
m_download(d) {
|
||||
|
||||
m_download.info()->signal_tracker_success().push_back(std::bind(&Download::receive_tracker_msg, this, ""));
|
||||
m_download.info()->signal_tracker_failed().push_back(std::bind(&Download::receive_tracker_msg, this, std::placeholders::_1));
|
||||
|
||||
+3
-3
@@ -100,10 +100,10 @@ private:
|
||||
|
||||
// Store the FileList instance so we can use slots etc on it.
|
||||
download_type m_download;
|
||||
bool m_hashFailed;
|
||||
bool m_hashFailed{};
|
||||
std::string m_message;
|
||||
uint32_t m_resumeFlags;
|
||||
unsigned int m_group;
|
||||
uint32_t m_resumeFlags{~uint32_t{}};
|
||||
unsigned int m_group{};
|
||||
};
|
||||
|
||||
inline bool
|
||||
|
||||
@@ -60,17 +60,7 @@ is_magnet_uri(const std::string& uri) {
|
||||
}
|
||||
|
||||
DownloadFactory::DownloadFactory(Manager* m) :
|
||||
m_manager(m),
|
||||
m_stream(NULL),
|
||||
m_object(NULL),
|
||||
m_commited(false),
|
||||
m_loaded(false),
|
||||
|
||||
m_session(false),
|
||||
m_start(false),
|
||||
m_printLog(true),
|
||||
m_isFile(false),
|
||||
m_initLoad(false) {
|
||||
m_manager(m) {
|
||||
|
||||
m_task_load.slot() = std::bind(&DownloadFactory::receive_load, this);
|
||||
m_task_commit.slot() = std::bind(&DownloadFactory::receive_commit, this);
|
||||
|
||||
@@ -63,18 +63,18 @@ private:
|
||||
void initialize_rtorrent(Download* download, torrent::Object* rtorrent);
|
||||
|
||||
Manager* m_manager;
|
||||
std::iostream* m_stream;
|
||||
torrent::Object* m_object;
|
||||
std::iostream* m_stream{};
|
||||
torrent::Object* m_object{};
|
||||
|
||||
bool m_commited;
|
||||
bool m_loaded;
|
||||
bool m_commited{};
|
||||
bool m_loaded{};
|
||||
|
||||
std::string m_uri;
|
||||
bool m_session;
|
||||
bool m_start;
|
||||
bool m_printLog;
|
||||
bool m_isFile;
|
||||
bool m_initLoad;
|
||||
bool m_session{};
|
||||
bool m_start{};
|
||||
bool m_printLog{true};
|
||||
bool m_isFile{};
|
||||
bool m_initLoad{};
|
||||
|
||||
command_list_type m_commands;
|
||||
torrent::Object::map_type m_variables;
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
using base_type::empty;
|
||||
using base_type::size;
|
||||
|
||||
DownloadList() { }
|
||||
DownloadList() = default;
|
||||
|
||||
void clear();
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
using base_type::empty;
|
||||
using base_type::size;
|
||||
|
||||
HttpQueue() {}
|
||||
HttpQueue() = default;
|
||||
~HttpQueue() { clear(); }
|
||||
|
||||
// Note that any slots connected to the CurlGet signals must be
|
||||
|
||||
@@ -50,7 +50,6 @@ Manager::push_log(const char* msg) {
|
||||
}
|
||||
|
||||
Manager::Manager() :
|
||||
m_hashingView(nullptr),
|
||||
m_log_important(torrent::log_open_log_buffer("important")),
|
||||
m_log_complete(torrent::log_open_log_buffer("complete")) {
|
||||
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ private:
|
||||
std::unique_ptr<HttpQueue> m_http_queue;
|
||||
std::unique_ptr<CurlStack> m_http_stack;
|
||||
|
||||
View* m_hashingView;
|
||||
View* m_hashingView{};
|
||||
|
||||
ThrottleMap m_throttles;
|
||||
AddressThrottleMap m_addressThrottles;
|
||||
|
||||
@@ -57,7 +57,7 @@ class RangeMap : private std::map<Key, std::pair<Key, T>, Compare,
|
||||
//std::allocator_traits<Alloc>::template rebind_alloc<std::pair<const Key, std::pair<Key, T>>>
|
||||
|
||||
public:
|
||||
RangeMap() {}
|
||||
RangeMap() = default;
|
||||
RangeMap(const Compare& c) : base_type(c) {}
|
||||
|
||||
typedef typename base_type::iterator iterator;
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ public:
|
||||
|
||||
using base_type::size_type;
|
||||
|
||||
View() {}
|
||||
View() = default;
|
||||
~View();
|
||||
|
||||
void initialize(const std::string& name);
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
using base_type::empty;
|
||||
using base_type::size;
|
||||
|
||||
ViewManager() {}
|
||||
ViewManager() = default;
|
||||
~ViewManager() { clear(); }
|
||||
|
||||
// Ffff... Just throwing together an interface, need to think some
|
||||
|
||||
Reference in New Issue
Block a user