diff options
author | David Robillard <d@drobilla.net> | 2020-11-29 11:44:45 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-29 11:53:37 +0100 |
commit | 29d31fd1a61e860c69a5a8b8b32156cea9075ae8 (patch) | |
tree | 314905f0d4ab832833718c85dc9a84d6a8bf05e5 /ganv | |
parent | 35153978b8e168e86932b33e11b72661cdf3db21 (diff) | |
download | ganv-29d31fd1a61e860c69a5a8b8b32156cea9075ae8.tar.gz ganv-29d31fd1a61e860c69a5a8b8b32156cea9075ae8.tar.bz2 ganv-29d31fd1a61e860c69a5a8b8b32156cea9075ae8.zip |
Fix Wsuggest-override warnings
Diffstat (limited to 'ganv')
-rw-r--r-- | ganv/Box.hpp | 6 | ||||
-rw-r--r-- | ganv/Edge.hpp | 2 | ||||
-rw-r--r-- | ganv/Node.hpp | 7 |
3 files changed, 10 insertions, 5 deletions
diff --git a/ganv/Box.hpp b/ganv/Box.hpp index 1b95859..6ea0392 100644 --- a/ganv/Box.hpp +++ b/ganv/Box.hpp @@ -28,7 +28,6 @@ public: : Node(canvas, GANV_NODE(gobj)) {} - RW_PROPERTY(const char*, label) RW_PROPERTY(gboolean, beveled) METHODRET0(ganv_box, double, get_x1) @@ -39,7 +38,10 @@ public: METHOD1(ganv_box, set_width, double, width) METHODRET0(ganv_box, double, get_height) METHOD1(ganv_box, set_height, double, height) - METHODRET0(ganv_box, double, get_border_width) + + double get_border_width() const override { + return ganv_box_get_border_width(gobj()); + } GanvBox* gobj() { return GANV_BOX(_gobj); } const GanvBox* gobj() const { return GANV_BOX(_gobj); } diff --git a/ganv/Edge.hpp b/ganv/Edge.hpp index a53c960..f7a50b1 100644 --- a/ganv/Edge.hpp +++ b/ganv/Edge.hpp @@ -57,7 +57,7 @@ public: : Item(GANV_ITEM(gobj)) {} - virtual ~Edge() { + ~Edge() override { if (_gobj && ganv_item_get_parent(_gobj)) { g_object_unref(_gobj); } diff --git a/ganv/Node.hpp b/ganv/Node.hpp index 979c426..ed983fe 100644 --- a/ganv/Node.hpp +++ b/ganv/Node.hpp @@ -40,7 +40,7 @@ public: CONNECT_PROP_SIGNAL(gobj, selected, on_notify_bool, &Node::on_selected) } - ~Node() { + ~Node() override { g_object_unref(_gobj); } @@ -68,7 +68,10 @@ public: GanvNode* gobj() { return GANV_NODE(_gobj); } const GanvNode* gobj() const { return GANV_NODE(_gobj); } - METHOD2(ganv_node, move, double, dx, double, dy) + void move(const double dx, const double dy) override { + ganv_node_move(gobj(), dx, dy); + } + METHOD2(ganv_node, move_to, double, x, double, y) METHOD0(ganv_node, disconnect) |