diff options
author | David Robillard <d@drobilla.net> | 2022-07-19 09:55:55 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-07-20 10:35:32 -0400 |
commit | 9bb3ab4e3e1ea403888ca34ef27cb316dcdde59d (patch) | |
tree | 227e8b2d5400f1adf98616b4d456850132d9c867 | |
parent | a38e46d2415bc19d8dd2f3157bfd4ead66e9c7f7 (diff) | |
download | patchage-9bb3ab4e3e1ea403888ca34ef27cb316dcdde59d.tar.gz patchage-9bb3ab4e3e1ea403888ca34ef27cb316dcdde59d.tar.bz2 patchage-9bb3ab4e3e1ea403888ca34ef27cb316dcdde59d.zip |
Use default member initialization
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | src/AlsaDriver.cpp | 6 | ||||
-rw-r--r-- | src/Patchage.cpp | 2 | ||||
-rw-r--r-- | src/Patchage.hpp | 4 |
4 files changed, 4 insertions, 9 deletions
diff --git a/.clang-tidy b/.clang-tidy index 0ac64c4..2b1f6d7 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -42,7 +42,6 @@ Checks: > -llvm-header-guard, -llvmlibc-*, -misc-no-recursion, - -modernize-use-default-member-init, -modernize-use-nodiscard, -modernize-use-trailing-return-type, -readability-convert-member-functions-to-static, diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp index a1b2caa..e20573a 100644 --- a/src/AlsaDriver.cpp +++ b/src/AlsaDriver.cpp @@ -68,8 +68,8 @@ private: void _refresh_main(); ILog& _log; - snd_seq_t* _seq; - pthread_t _refresh_thread; + snd_seq_t* _seq{nullptr}; + pthread_t _refresh_thread{}; struct SeqAddrComparator { bool operator()(const snd_seq_addr_t& a, const snd_seq_addr_t& b) const @@ -133,8 +133,6 @@ port_info(const snd_seq_port_info_t* const pinfo) AlsaDriver::AlsaDriver(ILog& log, EventSink emit_event) : Driver{std::move(emit_event)} , _log(log) - , _seq(nullptr) - , _refresh_thread{} {} AlsaDriver::~AlsaDriver() diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 6d6c13e..daad2c2 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -207,12 +207,10 @@ Patchage::Patchage(Options options) , _conf([this](const Setting& setting) { on_conf_change(setting); }) , _log(_status_text) , _canvas(new Canvas{_log, _action_sink, 1600 * 2, 1200 * 2}) - , _legend(nullptr) , _drivers(_log, [this](const Event& event) { on_driver_event(event); }) , _reactor(_conf, _drivers, *_canvas, _log) , _action_sink([this](const Action& action) { _reactor(action); }) , _options{options} - , _attach(true) { Glib::set_application_name("Patchage"); _about_win->property_program_name() = "Patchage"; diff --git a/src/Patchage.hpp b/src/Patchage.hpp index 6f70620..c4a4687 100644 --- a/src/Patchage.hpp +++ b/src/Patchage.hpp @@ -180,7 +180,7 @@ protected: std::mutex _events_mutex; std::queue<Event> _driver_events; BufferSizeColumns _buf_size_columns; - Legend* _legend; + Legend* _legend{nullptr}; Metadata _metadata; Drivers _drivers; Reactor _reactor; @@ -190,7 +190,7 @@ protected: Glib::RefPtr<Gtk::TextTag> _warning_tag; Options _options; - bool _attach; + bool _attach{true}; }; } // namespace patchage |