diff options
author | David Robillard <d@drobilla.net> | 2020-02-09 14:34:20 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-02-09 14:34:20 +0100 |
commit | af5ec4bdda21e9a2f76f22050216a0b1cbbed575 (patch) | |
tree | f93ddc033b70297abb472f7e28a06f9e936cf0ee /src/Widget.hpp | |
parent | c321c02a6b9c67b4b106e36a77167ee279b9ef78 (diff) | |
download | patchage-af5ec4bdda21e9a2f76f22050216a0b1cbbed575.tar.gz patchage-af5ec4bdda21e9a2f76f22050216a0b1cbbed575.tar.bz2 patchage-af5ec4bdda21e9a2f76f22050216a0b1cbbed575.zip |
Format all code with clang-format
This configuration tries to get as close to the previous style as possible so
the changes aren't too dramatic. It's still far from ideal and the code could
use some adaptation, but this makes things much easier to work on.
Diffstat (limited to 'src/Widget.hpp')
-rw-r--r-- | src/Widget.hpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Widget.hpp b/src/Widget.hpp index 6089d41..03c5f8e 100644 --- a/src/Widget.hpp +++ b/src/Widget.hpp @@ -21,10 +21,12 @@ #include <string> -template <typename W> -class Widget { +template<typename W> +class Widget +{ public: - Widget(Glib::RefPtr<Gtk::Builder> xml, const std::string& name) { + Widget(Glib::RefPtr<Gtk::Builder> xml, const std::string& name) + { xml->get_widget(name, _me); } @@ -33,12 +35,12 @@ public: void destroy() { delete _me; } - W* get() { return _me; } - const W* get() const { return _me; } - W* operator->() { return _me; } + W* get() { return _me; } + const W* get() const { return _me; } + W* operator->() { return _me; } const W* operator->() const { return _me; } - W& operator*() { return *_me; } - const W& operator*() const { return *_me; } + W& operator*() { return *_me; } + const W& operator*() const { return *_me; } private: W* _me; |