clang-tidy: use default member init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2025-05-29 17:06:35 -07:00
committed by Jari Sundell
parent 3ab38583b8
commit 897a6face2
67 changed files with 119 additions and 211 deletions
+8 -13
View File
@@ -29,19 +29,14 @@
#include "control.h"
Control::Control() :
m_ui(new ui::Root()),
m_display(new display::Manager()),
m_input(new input::Manager()),
m_inputStdin(new input::InputEvent(STDIN_FILENO)),
m_commandScheduler(new rpc::CommandScheduler()),
m_objectStorage(new rpc::object_storage()),
m_lua_engine(new rpc::LuaEngine()),
m_directory_events(new torrent::directory_events()),
m_tick(0),
m_shutdownReceived(false),
m_shutdownQuick(false) {
m_ui(new ui::Root()),
m_display(new display::Manager()),
m_input(new input::Manager()),
m_inputStdin(new input::InputEvent(STDIN_FILENO)),
m_commandScheduler(new rpc::CommandScheduler()),
m_objectStorage(new rpc::object_storage()),
m_lua_engine(new rpc::LuaEngine()),
m_directory_events(new torrent::directory_events()) {
m_core = new core::Manager();
m_viewManager = new core::ViewManager();
+3 -3
View File
@@ -94,15 +94,15 @@ private:
rpc::LuaEngine* m_lua_engine;
torrent::directory_events* m_directory_events;
uint64_t m_tick;
uint64_t m_tick{};
mode_t m_umask;
std::string m_workingDirectory;
torrent::utils::SchedulerEntry m_task_shutdown;
std::atomic<bool> m_shutdownReceived;
std::atomic<bool> m_shutdownQuick;
std::atomic<bool> m_shutdownReceived{};
std::atomic<bool> m_shutdownQuick{};
};
#endif
+1 -3
View File
@@ -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
View File
@@ -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;
};
+2 -3
View File
@@ -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;
};
+1 -5
View File
@@ -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
View File
@@ -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
+1 -11
View File
@@ -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);
+9 -9
View File
@@ -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;
+1 -1
View File
@@ -39,7 +39,7 @@ public:
using base_type::empty;
using base_type::size;
DownloadList() { }
DownloadList() = default;
void clear();
+1 -1
View File
@@ -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
-1
View File
@@ -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
View File
@@ -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;
+1 -1
View File
@@ -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
View File
@@ -39,7 +39,7 @@ public:
using base_type::size_type;
View() {}
View() = default;
~View();
void initialize(const std::string& name);
+1 -1
View File
@@ -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
+1 -1
View File
@@ -35,7 +35,7 @@ public:
static const int color_invalid = ~int();
static const int color_default = 0;
Attributes() {}
Attributes() = default;
Attributes(const char* pos, int attr, int col) :
m_position(pos), m_attributes(attr), m_colors(col) {}
Attributes(const char* pos, const Attributes& old) :
-9
View File
@@ -47,15 +47,6 @@
namespace display {
Frame::Frame() :
m_type(TYPE_NONE),
m_positionX(0),
m_positionY(0),
m_width(0),
m_height(0) {
}
bool
Frame::is_width_dynamic() const {
switch (m_type) {
+6 -8
View File
@@ -56,7 +56,7 @@ public:
};
struct bounds_type {
bounds_type() {}
bounds_type() = default;
bounds_type(extent_type minW, extent_type minH, extent_type maxW, extent_type maxH) :
minWidth(minW), minHeight(minH), maxWidth(maxW), maxHeight(maxH) {}
@@ -74,8 +74,6 @@ public:
static const size_type max_size = 5;
Frame();
bool is_width_dynamic() const;
bool is_height_dynamic() const;
@@ -116,12 +114,12 @@ private:
inline void balance_row(uint32_t x, uint32_t y, uint32_t width, uint32_t height);
inline void balance_column(uint32_t x, uint32_t y, uint32_t width, uint32_t height);
Type m_type;
Type m_type{TYPE_NONE};
uint32_t m_positionX;
uint32_t m_positionY;
uint32_t m_width;
uint32_t m_height;
uint32_t m_positionX{};
uint32_t m_positionY{};
uint32_t m_width{};
uint32_t m_height{};
union {
Window* m_window;
+2 -2
View File
@@ -51,8 +51,8 @@ public:
static const extent_type extent_full = ~extent_type();
TextElement() {}
virtual ~TextElement() {}
TextElement() = default;
virtual ~TextElement() = default;
// The last element must point to a valid memory location into which
// the caller must write a '\0' to terminate the c string. The
+2 -3
View File
@@ -61,7 +61,6 @@ public:
using base_type::push_back;
TextElementList() : m_column(0), m_columnWidth(0) {}
virtual ~TextElementList() { clear(); }
void clear();
@@ -74,8 +73,8 @@ public:
virtual extent_type max_length();
private:
unsigned int m_column;
extent_type* m_columnWidth;
unsigned int m_column{};
extent_type* m_columnWidth{};
};
}
+1 -2
View File
@@ -15,8 +15,7 @@
namespace display {
WindowDownloadList::WindowDownloadList() :
Window(new Canvas, 0, 120, 1, extent_full, extent_full),
m_view(NULL) {
Window(new Canvas, 0, 120, 1, extent_full, extent_full) {
}
WindowDownloadList::~WindowDownloadList() {
+1 -1
View File
@@ -24,7 +24,7 @@ public:
int page_size();
private:
core::View* m_view;
core::View* m_view{};
std::pair<int, int> get_attr_color(core::View::iterator selected);
signal_void_itr m_changed_itr;
+3 -5
View File
@@ -50,9 +50,7 @@ namespace display {
class WindowInput : public Window {
public:
WindowInput() :
Window(new Canvas, 0, 0, 1, extent_full, 1),
m_input(NULL),
m_focus(false) {}
Window(new Canvas, 0, 0, 1, extent_full, 1) {}
input::TextInput* input() { return m_input; }
void set_input(input::TextInput* input) { m_input = input; }
@@ -66,10 +64,10 @@ public:
virtual void redraw();
private:
input::TextInput* m_input;
input::TextInput* m_input{};
std::string m_title;
bool m_focus;
bool m_focus{};
};
}
+1 -2
View File
@@ -13,8 +13,7 @@ WindowLogComplete::WindowLogComplete(torrent::log_buffer* l) :
m_log(l) {
}
WindowLogComplete::~WindowLogComplete() {
}
WindowLogComplete::~WindowLogComplete() = default;
WindowLogComplete::iterator
WindowLogComplete::find_older() {
+2 -3
View File
@@ -10,13 +10,12 @@ namespace display {
class WindowStatusbar : public Window {
public:
WindowStatusbar() :
Window(new Canvas, 0, 0, 1, extent_full, extent_static),
m_lastTick(0) {}
Window(new Canvas, 0, 0, 1, extent_full, extent_static) {}
virtual void redraw();
private:
uint64_t m_lastTick;
uint64_t m_lastTick{};
};
}
+1 -2
View File
@@ -10,8 +10,7 @@ WindowStringList::WindowStringList() :
Window(new Canvas, 0, 0, 0, extent_full, extent_full) {
}
WindowStringList::~WindowStringList() {
}
WindowStringList::~WindowStringList() = default;
void
WindowStringList::redraw() {
+3 -5
View File
@@ -9,11 +9,9 @@
namespace display {
WindowText::WindowText(rpc::target_type target, extent_type margin) :
Window(new Canvas, 0, 0, 0, extent_static, extent_static),
m_target(target),
m_errorHandler(NULL),
m_margin(margin),
m_interval(0) {
Window(new Canvas, 0, 0, 0, extent_static, extent_static),
m_target(target),
m_margin(margin) {
}
void
+2 -2
View File
@@ -47,10 +47,10 @@ public:
private:
rpc::target_type m_target;
TextElement* m_errorHandler;
TextElement* m_errorHandler{};
extent_type m_margin;
uint32_t m_interval;
uint32_t m_interval{};
};
}
+2 -2
View File
@@ -64,7 +64,7 @@ public:
using base_type::operator[];
Bindings() : m_enabled(true) {}
Bindings() = default;
void enable() { m_enabled = true; }
void disable() { m_enabled = false; }
@@ -74,7 +74,7 @@ public:
void ignore(int key) { (*this)[key] = slot_void(); }
private:
bool m_enabled;
bool m_enabled{true};
};
}
+2 -4
View File
@@ -24,16 +24,14 @@ public:
using Base::push_back;
Manager() : m_textInput(NULL) {}
void erase(Bindings* b);
void pressed(int key);
void set_text_input(TextInput* input = NULL) { m_textInput = input; }
void set_text_input(TextInput* input = nullptr) { m_textInput = input; }
private:
TextInput* m_textInput;
TextInput* m_textInput{};
};
}
-4
View File
@@ -49,10 +49,6 @@
namespace input {
PathInput::PathInput() :
m_showNext(false) {
}
bool
PathInput::pressed(int key) {
// Consider binding tab in m_bindings instead.
+2 -3
View File
@@ -55,8 +55,7 @@ public:
typedef std::list<slot_void> signal_void;
typedef std::list<slot_itr_itr> signal_itr_itr;
PathInput();
virtual ~PathInput() {}
virtual ~PathInput() = default;
signal_void& signal_show_next() { return m_signal_show_next; }
signal_itr_itr& signal_show_range() { return m_signal_show_range; }
@@ -69,7 +68,7 @@ private:
size_type find_last_delim();
range_type find_incomplete(utils::Directory& d, const std::string& f);
bool m_showNext;
bool m_showNext{};
signal_void m_signal_show_next;
signal_itr_itr m_signal_show_range;
+2 -3
View File
@@ -54,8 +54,7 @@ public:
using Base::size_type;
using Base::npos;
TextInput() : m_pos(0) {}
virtual ~TextInput() {}
virtual ~TextInput() = default;
size_type get_pos() { return m_pos; }
void set_pos(size_type pos) { m_pos = pos; }
@@ -72,7 +71,7 @@ public:
Bindings& bindings() { return m_bindings; }
private:
size_type m_pos;
size_type m_pos{};
slot_void m_slot_dirty;
+1 -1
View File
@@ -68,7 +68,7 @@ command_base::pop_stack(stack_type* stack, torrent::Object* last_stack) {
last_stack->~Object();
// To ensure we catch errors:
std::memset(last_stack, 0xAA, sizeof(torrent::Object));
std::memset((void*)last_stack, 0xAA, sizeof(torrent::Object));
}
}
+2 -4
View File
@@ -20,9 +20,7 @@ struct command_map_data_type {
command_map_data_type(int flags, const char* parm, const char* doc) :
m_flags(flags), m_parm(parm), m_doc(doc) {}
command_map_data_type(const command_map_data_type& src) :
m_variable(src.m_variable), m_anySlot(src.m_anySlot),
m_flags(src.m_flags), m_parm(src.m_parm), m_doc(src.m_doc) {}
command_map_data_type(const command_map_data_type& src) = default;
command_base m_variable;
command_base::any_slot m_anySlot;
@@ -59,7 +57,7 @@ public:
static const int flag_file_target = 0x200;
static const int flag_tracker_target = 0x400;
CommandMap() {}
CommandMap() = default;
bool has(const std::string& key) const { return base_type::find(key) != base_type::end(); }
+1 -1
View File
@@ -24,7 +24,7 @@ public:
using base_type::begin;
using base_type::end;
CommandScheduler() {}
CommandScheduler() = default;
~CommandScheduler();
void set_slot_error_message(SlotString s) { m_slotErrorMessage = s; }
+2 -2
View File
@@ -13,7 +13,7 @@ class CommandSchedulerItem {
public:
typedef std::function<void ()> slot_void;
CommandSchedulerItem(const std::string& key) : m_key(key), m_interval(0) {}
CommandSchedulerItem(const std::string& key) : m_key(key) {}
~CommandSchedulerItem();
bool is_queued() const { return m_task.is_scheduled(); }
@@ -40,7 +40,7 @@ private:
std::string m_key;
torrent::Object m_command;
uint32_t m_interval;
uint32_t m_interval{};
std::chrono::microseconds m_time_scheduled;
torrent::utils::SchedulerEntry m_task;
+1 -3
View File
@@ -15,8 +15,6 @@ public:
static constexpr int flag_capture = 0x4;
static constexpr int flag_background = 0x8;
ExecFile() : m_log_fd(-1) {}
int log_fd() const { return m_log_fd; }
void set_log_fd(int fd) { m_log_fd = fd; }
@@ -24,7 +22,7 @@ public:
torrent::Object execute_object(const torrent::Object& rawArgs, int flags);
private:
int m_log_fd;
int m_log_fd{-1};
std::string m_capture;
};
+1 -1
View File
@@ -24,7 +24,7 @@ class rpc_error : public torrent::base_error {
public:
rpc_error(int type, std::string msg) :
m_type(type), m_msg(msg) {}
virtual ~rpc_error() throw() {}
virtual ~rpc_error() throw() = default;
virtual int type() const throw() { return m_type; }
virtual const char* what() const throw() { return m_msg.c_str(); }
+1 -2
View File
@@ -17,7 +17,6 @@ class SCgi : public torrent::Event {
public:
static const int max_tasks = 100;
SCgi() : m_logFd(-1) {}
~SCgi() override;
const char* type_name() const override { return "scgi"; }
@@ -43,7 +42,7 @@ private:
void open(void* sa, unsigned int length);
std::string m_path;
int m_logFd;
int m_logFd{-1};
SCgiTask m_task[max_tasks];
};
+4 -6
View File
@@ -38,8 +38,6 @@ public:
static void object_to_target(const torrent::Object& obj, int callFlags, rpc::target_type* target);
XmlRpc() : m_env(NULL), m_registry(NULL), m_dialect(dialect_i8), m_sizeLimit(SCgiTask::max_content_size) {}
bool is_valid() const;
void initialize();
@@ -67,14 +65,14 @@ private:
slot_peer m_slotFindPeer;
// Only used by xmlrpc-c
void* m_env;
void* m_registry;
void* m_env{};
void* m_registry{};
int m_dialect;
int m_dialect{dialect_i8};
// Only used by tinyxml2
bool m_isValid;
uint64_t m_sizeLimit;
uint64_t m_sizeLimit{SCgiTask::max_content_size};
};
+1 -3
View File
@@ -34,9 +34,7 @@
namespace ui {
Download::Download(core::Download* d) :
m_download(d),
m_state(DISPLAY_MAX_SIZE),
m_focusDisplay(false) {
m_download(d) {
m_windowDownloadStatus = new WDownloadStatus(d);
m_windowDownloadStatus->set_bottom(true);
+2 -2
View File
@@ -110,10 +110,10 @@ private:
core::Download* m_download;
Display m_state;
Display m_state{DISPLAY_MAX_SIZE};
ElementBase* m_uiArray[DISPLAY_MAX_SIZE];
bool m_focusDisplay;
bool m_focusDisplay{};
WDownloadStatus* m_windowDownloadStatus;
};
+1 -3
View File
@@ -33,9 +33,7 @@
namespace ui {
DownloadList::DownloadList() :
m_state(DISPLAY_MAX_SIZE) {
DownloadList::DownloadList() {
m_uiArray[DISPLAY_DOWNLOAD] = NULL;
m_uiArray[DISPLAY_DOWNLOAD_LIST] = new ElementDownloadList();
m_uiArray[DISPLAY_LOG] = new ElementLogComplete(control->core()->log_complete());
+1 -1
View File
@@ -116,7 +116,7 @@ private:
void setup_keys();
void setup_input();
Display m_state;
Display m_state{DISPLAY_MAX_SIZE};
ElementBase* m_uiArray[DISPLAY_MAX_SIZE];
WLog* m_windowLog;
+3 -4
View File
@@ -50,8 +50,7 @@ class ElementBase {
public:
typedef std::function<void ()> slot_type;
ElementBase() : m_frame(NULL), m_focus(false) {}
virtual ~ElementBase() {}
virtual ~ElementBase() = default;
bool is_active() const { return m_frame != NULL; }
@@ -65,8 +64,8 @@ public:
void mark_dirty();
protected:
display::Frame* m_frame;
bool m_focus;
display::Frame* m_frame{};
bool m_focus{};
input::Bindings m_bindings;
slot_type m_slot_exit;
+1 -3
View File
@@ -48,9 +48,7 @@
namespace ui {
ElementChunksSeen::ElementChunksSeen(core::Download* d) :
m_download(d),
m_window(NULL),
m_focus(0) {
m_download(d) {
m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = std::bind(&slot_type::operator(), &m_slot_exit);
+2 -3
View File
@@ -68,10 +68,9 @@ private:
void receive_pageprev();
core::Download* m_download;
WChunksSeen* m_window;
WChunksSeen* m_window{};
unsigned int m_focus;
unsigned int m_focus{};
};
}
+1 -4
View File
@@ -18,10 +18,7 @@
namespace ui {
ElementDownloadList::ElementDownloadList() :
m_window(NULL),
m_view(NULL) {
ElementDownloadList::ElementDownloadList() {
receive_change_view("main");
if (m_view == NULL)
+2 -2
View File
@@ -50,8 +50,8 @@ public:
void toggle_layout();
private:
WDownloadList* m_window;
core::View* m_view;
WDownloadList* m_window{};
core::View* m_view{};
};
} // namespace ui
+2 -8
View File
@@ -54,14 +54,8 @@
namespace ui {
ElementFileList::ElementFileList(core::Download* d) :
m_download(d),
m_state(DISPLAY_MAX_SIZE),
m_window(NULL),
m_elementInfo(NULL),
m_selected(iterator(d->download()->file_list()->begin())),
m_collapsed(false) {
m_download(d),
m_selected(iterator(d->download()->file_list()->begin())) {
m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = std::bind(&slot_type::operator(), &m_slot_exit);
m_bindings[KEY_RIGHT] = m_bindings['F' - '@'] = std::bind(&ElementFileList::receive_select, this);
+5 -5
View File
@@ -92,13 +92,13 @@ private:
core::Download* m_download;
Display m_state;
WFileList* m_window;
ElementText* m_elementInfo;
Display m_state{DISPLAY_MAX_SIZE};
WFileList* m_window{};
ElementText* m_elementInfo{};
// Change to unsigned, please.
iterator m_selected;
bool m_collapsed;
bool m_collapsed{};
};
}
+1 -2
View File
@@ -15,8 +15,7 @@
namespace ui {
ElementLogComplete::ElementLogComplete(torrent::log_buffer* l) :
m_window(NULL),
m_log(l) {
m_log(l) {
unsigned int signal_index = torrent::main_thread::thread()->signal_bitfield()->add_signal(std::bind(&ElementLogComplete::received_update, this));
+1 -1
View File
@@ -63,7 +63,7 @@ public:
private:
void received_update();
WLogComplete* m_window;
WLogComplete* m_window{};
torrent::log_buffer* m_log;
};
+1 -2
View File
@@ -56,8 +56,7 @@
namespace ui {
ElementPeerList::ElementPeerList(core::Download* d) :
m_download(d),
m_state(DISPLAY_MAX_SIZE) {
m_download(d) {
m_listItr = m_list.end();
+1 -1
View File
@@ -85,7 +85,7 @@ private:
core::Download* m_download;
Display m_state;
Display m_state{DISPLAY_MAX_SIZE};
display::Window* m_windowList;
ElementText* m_elementInfo;
-4
View File
@@ -46,10 +46,6 @@
namespace ui {
ElementStringList::ElementStringList() :
m_window(NULL) {
}
void
ElementStringList::activate(display::Frame* frame, bool focus) {
if (is_active())
+1 -3
View File
@@ -56,8 +56,6 @@ public:
typedef display::WindowStringList WStringList;
typedef std::list<std::string> List;
ElementStringList();
void activate(display::Frame* frame, bool focus = true);
void disable();
@@ -101,7 +99,7 @@ public:
void next_screen();
private:
WStringList* m_window;
WStringList* m_window{};
List m_list;
};
+1 -3
View File
@@ -49,9 +49,7 @@
namespace ui {
ElementText::ElementText(rpc::target_type target) :
m_window(new WindowText(target)),
m_column(0),
m_columnWidth(0) {
m_window(new WindowText(target)) {
// Move bindings into a function that defines default bindings.
m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = std::bind(&slot_type::operator(), &m_slot_exit);
+2 -2
View File
@@ -102,8 +102,8 @@ public:
private:
WindowText* m_window;
unsigned int m_column;
extent_type m_columnWidth;
unsigned int m_column{};
extent_type m_columnWidth{};
};
struct text_element_wrapper {
+1 -3
View File
@@ -13,9 +13,7 @@
namespace ui {
ElementTrackerList::ElementTrackerList(core::Download* d) :
m_download(d),
m_window(NULL),
m_focus(0) {
m_download(d) {
m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = std::bind(&slot_type::operator(), &m_slot_exit);
+2 -2
View File
@@ -69,10 +69,10 @@ private:
void receive_cycle_group();
core::Download* m_download;
WTrackerList* m_window;
WTrackerList* m_window{};
// Change to unsigned, please.
unsigned int m_focus;
unsigned int m_focus{};
};
}
+1 -3
View File
@@ -48,9 +48,7 @@
namespace ui {
ElementTransferList::ElementTransferList(core::Download* d) :
m_download(d),
m_window(NULL),
m_focus(0) {
m_download(d) {
m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = std::bind(&slot_type::operator(), &m_slot_exit);
+2 -3
View File
@@ -68,10 +68,9 @@ private:
void receive_pageprev();
core::Download* m_download;
WTransferList* m_window;
WTransferList* m_window{};
unsigned int m_focus;
unsigned int m_focus{};
};
}
+1 -1
View File
@@ -80,7 +80,7 @@ public:
static const int update_sort = 0x1;
static const int update_hide_dot = 0x2;
Directory() {}
Directory() = default;
Directory(const std::string& path) : m_path(path) {}
bool is_valid() const;
+1 -3
View File
@@ -52,8 +52,6 @@ class Lockfile {
public:
typedef std::pair<std::string, pid_t> process_type;
Lockfile() : m_locked(false) {}
bool is_locked() const { return m_locked; }
bool is_stale();
@@ -70,7 +68,7 @@ public:
private:
std::string m_path;
bool m_locked;
bool m_locked{};
};
}