summaryrefslogtreecommitdiffstats
path: root/src/gui/Window.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-01 18:59:18 +0200
committerDavid Robillard <d@drobilla.net>2020-08-02 01:48:48 +0200
commit7b70b455e6199b508217b021d9a0dfc08f9a7794 (patch)
treecb005e7cd9414cc3eb4b7c1baa52de69664dcd02 /src/gui/Window.hpp
parent848bb52824657c20b1d758aebcecefb5d8c37fb9 (diff)
downloadingen-7b70b455e6199b508217b021d9a0dfc08f9a7794.tar.gz
ingen-7b70b455e6199b508217b021d9a0dfc08f9a7794.tar.bz2
ingen-7b70b455e6199b508217b021d9a0dfc08f9a7794.zip
Use default member initialization
Diffstat (limited to 'src/gui/Window.hpp')
-rw-r--r--src/gui/Window.hpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/gui/Window.hpp b/src/gui/Window.hpp
index ab3586fc..f5b323f0 100644
--- a/src/gui/Window.hpp
+++ b/src/gui/Window.hpp
@@ -33,8 +33,12 @@ class App;
class Window : public Gtk::Window
{
public:
- Window() : _app(nullptr) {}
- explicit Window(BaseObjectType* cobject) : Gtk::Window(cobject), _app(nullptr) {}
+ Window() = default;
+
+ explicit Window(BaseObjectType* cobject)
+ : Gtk::Window(cobject)
+ {
+ }
virtual void init_window(App& app) { _app = &app; }
@@ -48,7 +52,7 @@ public:
static bool key_press_handler(Gtk::Window* win, GdkEventKey* event);
- App* _app;
+ App* _app = nullptr;
};
/** Ingen GUI Dialog
@@ -57,8 +61,12 @@ public:
class Dialog : public Gtk::Dialog
{
public:
- Dialog() : _app(nullptr) {}
- explicit Dialog(BaseObjectType* cobject) : Gtk::Dialog(cobject), _app(nullptr) {}
+ Dialog() = default;
+
+ explicit Dialog(BaseObjectType* cobject)
+ : Gtk::Dialog(cobject)
+ {
+ }
virtual void init_dialog(App& app) { _app = &app; }
@@ -70,7 +78,7 @@ public:
return Gtk::Window::on_key_press_event(event);
}
- App* _app;
+ App* _app = nullptr;
};
} // namespace gui