mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 06:32:31 +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
@@ -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) :
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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{};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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{};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -13,8 +13,7 @@ WindowLogComplete::WindowLogComplete(torrent::log_buffer* l) :
|
||||
m_log(l) {
|
||||
}
|
||||
|
||||
WindowLogComplete::~WindowLogComplete() {
|
||||
}
|
||||
WindowLogComplete::~WindowLogComplete() = default;
|
||||
|
||||
WindowLogComplete::iterator
|
||||
WindowLogComplete::find_older() {
|
||||
|
||||
@@ -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{};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -10,8 +10,7 @@ WindowStringList::WindowStringList() :
|
||||
Window(new Canvas, 0, 0, 0, extent_full, extent_full) {
|
||||
}
|
||||
|
||||
WindowStringList::~WindowStringList() {
|
||||
}
|
||||
WindowStringList::~WindowStringList() = default;
|
||||
|
||||
void
|
||||
WindowStringList::redraw() {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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{};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user