mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 05:02: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
@@ -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
@@ -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{};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -49,10 +49,6 @@
|
||||
|
||||
namespace input {
|
||||
|
||||
PathInput::PathInput() :
|
||||
m_showNext(false) {
|
||||
}
|
||||
|
||||
bool
|
||||
PathInput::pressed(int key) {
|
||||
// Consider binding tab in m_bindings instead.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user