From 13bf512e8cde1e79bc0a84b7ff8b4abcb8be60c8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 15 Dec 2020 19:30:54 +0100 Subject: Use brace initialization of return values --- ganv/Module.hpp | 12 ++++++------ 1 file 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; using const_iterator = iterator_base; - 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(gobj()), 0); } - const_iterator end() const { return iterator(const_cast(gobj()), num_ports()); } - const_iterator back() const { return iterator(const_cast(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(gobj()), 0}; } + const_iterator end() const { return {const_cast(gobj()), num_ports()}; } + const_iterator back() const { return {const_cast(gobj()), num_ports() - 1}; } void embed(Gtk::Widget* widget) { ganv_module_embed(gobj(), widget ? widget->gobj() : nullptr); -- cgit v1.2.1