summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-15 19:30:26 +0100
committerDavid Robillard <d@drobilla.net>2020-12-15 19:32:28 +0100
commit5d812e6f310ed31ad913bd42cf7ff94d2fcdefd7 (patch)
treee0154d169ffdaa5ae8e4d910f5f413e0784e1b4c
parent7bc3e5ca81642996fae52e4d8ca6add67b994eaf (diff)
downloadganv-5d812e6f310ed31ad913bd42cf7ff94d2fcdefd7.tar.gz
ganv-5d812e6f310ed31ad913bd42cf7ff94d2fcdefd7.tar.bz2
ganv-5d812e6f310ed31ad913bd42cf7ff94d2fcdefd7.zip
Clean up special member functions
-rw-r--r--.clang-tidy2
-rw-r--r--ganv/Edge.hpp5
-rw-r--r--ganv/Node.hpp6
-rw-r--r--src/Canvas.cpp6
4 files changed, 16 insertions, 3 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 57cfc9e..31d8ba7 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -9,7 +9,6 @@ Checks: >
-*-named-parameter,
-*-narrowing-conversions,
-*-no-malloc,
- -*-special-member-functions,
-*-uppercase-literal-suffix,
-*-use-auto,
-*-use-nullptr,
@@ -58,7 +57,6 @@ Checks: >
-misc-non-private-member-variables-in-classes,
-modernize-loop-convert,
-modernize-raw-string-literal,
- -modernize-use-default-member-init,
-modernize-use-trailing-return-type,
-performance-faster-string-find,
-readability-const-return-type,
diff --git a/ganv/Edge.hpp b/ganv/Edge.hpp
index 71a2ed3..a0d9a7c 100644
--- a/ganv/Edge.hpp
+++ b/ganv/Edge.hpp
@@ -59,9 +59,12 @@ public:
: Item(GANV_ITEM(gobj))
{}
- Edge(const Edge& copy) = delete;
+ Edge(const Edge&) = delete;
Edge& operator=(const Edge& other) = delete;
+ Edge(Edge&&) = delete;
+ Edge& operator=(Edge&&) = delete;
+
~Edge() override {
if (_gobj && ganv_item_get_parent(_gobj)) {
g_object_unref(_gobj);
diff --git a/ganv/Node.hpp b/ganv/Node.hpp
index e075e73..7980566 100644
--- a/ganv/Node.hpp
+++ b/ganv/Node.hpp
@@ -45,6 +45,12 @@ public:
CONNECT_PROP_SIGNAL(gobj, selected, on_notify_bool, &Node::on_selected)
}
+ Node(const Node&) = delete;
+ Node& operator=(const Node&) = delete;
+
+ Node(Node&&) = delete;
+ Node& operator=(Node&&) = delete;
+
~Node() override {
g_object_unref(_gobj);
}
diff --git a/src/Canvas.cpp b/src/Canvas.cpp
index 92258bd..1219950 100644
--- a/src/Canvas.cpp
+++ b/src/Canvas.cpp
@@ -301,6 +301,12 @@ struct GanvCanvasImpl {
_move_cursor = gdk_cursor_new(GDK_FLEUR);
}
+ GanvCanvasImpl(const GanvCanvasImpl&) = delete;
+ GanvCanvasImpl& operator=(const GanvCanvasImpl&) = delete;
+
+ GanvCanvasImpl(GanvCanvasImpl&&) = delete;
+ GanvCanvasImpl& operator=(GanvCanvasImpl&&) = delete;
+
~GanvCanvasImpl()
{
if (_animate_idle_id) {