diff options
author | David Robillard <d@drobilla.net> | 2020-12-15 19:30:54 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-15 19:32:28 +0100 |
commit | 13bf512e8cde1e79bc0a84b7ff8b4abcb8be60c8 (patch) | |
tree | 1254e9f51f1fef583916870fda870a3378952c82 /ganv | |
parent | 5d812e6f310ed31ad913bd42cf7ff94d2fcdefd7 (diff) | |
download | ganv-13bf512e8cde1e79bc0a84b7ff8b4abcb8be60c8.tar.gz ganv-13bf512e8cde1e79bc0a84b7ff8b4abcb8be60c8.tar.bz2 ganv-13bf512e8cde1e79bc0a84b7ff8b4abcb8be60c8.zip |
Use brace initialization of return values
Diffstat (limited to 'ganv')
-rw-r--r-- | ganv/Module.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ganv/Module.hpp b/ganv/Module.hpp index cfe9407..8beea60 100644 --- a/ganv/Module.hpp +++ b/ganv/Module.hpp @@ -101,12 +101,12 @@ public: using iterator = iterator_base<Port, GanvPort>; using const_iterator = iterator_base<const Port, const GanvPort>; - iterator begin() { return iterator(gobj(), 0); } - iterator end() { return iterator(gobj(), num_ports()); } - iterator back() { return iterator(gobj(), num_ports() - 1); } - const_iterator begin() const { return iterator(const_cast<GanvModule*>(gobj()), 0); } - const_iterator end() const { return iterator(const_cast<GanvModule*>(gobj()), num_ports()); } - const_iterator back() const { return iterator(const_cast<GanvModule*>(gobj()), num_ports() - 1); } + iterator begin() { return {gobj(), 0}; } + iterator end() { return {gobj(), num_ports()}; } + iterator back() { return {gobj(), num_ports() - 1}; } + const_iterator begin() const { return {const_cast<GanvModule*>(gobj()), 0}; } + const_iterator end() const { return {const_cast<GanvModule*>(gobj()), num_ports()}; } + const_iterator back() const { return {const_cast<GanvModule*>(gobj()), num_ports() - 1}; } void embed(Gtk::Widget* widget) { ganv_module_embed(gobj(), widget ? widget->gobj() : nullptr); |