summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-15 19:30:54 +0100
committerDavid Robillard <d@drobilla.net>2020-12-15 19:32:28 +0100
commit13bf512e8cde1e79bc0a84b7ff8b4abcb8be60c8 (patch)
tree1254e9f51f1fef583916870fda870a3378952c82
parent5d812e6f310ed31ad913bd42cf7ff94d2fcdefd7 (diff)
downloadganv-13bf512e8cde1e79bc0a84b7ff8b4abcb8be60c8.tar.gz
ganv-13bf512e8cde1e79bc0a84b7ff8b4abcb8be60c8.tar.bz2
ganv-13bf512e8cde1e79bc0a84b7ff8b4abcb8be60c8.zip
Use brace initialization of return values
-rw-r--r--ganv/Module.hpp12
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);