From ee2c52dc8794d0aa060b812dd3a3f55a5467ccf4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 3 Aug 2020 12:53:57 +0200 Subject: Fix deprecated-copy-dtor warnings --- sord/sordmm.hpp | 10 ++++++++++ wscript | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sord/sordmm.hpp b/sord/sordmm.hpp index a9a8f91..c4236d5 100644 --- a/sord/sordmm.hpp +++ b/sord/sordmm.hpp @@ -423,7 +423,17 @@ Node::to_bool() const struct Iter : public Wrapper { inline Iter(World& world, SordIter* c_obj) : Wrapper(c_obj), _world(world) {} + + Iter(const Iter&) = delete; + Iter& operator=(const Iter&) = delete; + + inline Iter(Iter&& iter) + : Wrapper(iter) + , _world(iter._world) + {} + inline ~Iter() { sord_iter_free(_c_obj); } + inline bool end() const { return sord_iter_end(_c_obj); } inline bool next() const { return sord_iter_next(_c_obj); } inline Iter& operator++() { diff --git a/wscript b/wscript index 2ab9bfc..fe591e5 100644 --- a/wscript +++ b/wscript @@ -106,7 +106,6 @@ def configure(conf): '-Wno-multiple-inheritance', ], 'clang': [ - '-Wno-deprecated-copy-dtor', '-Wno-implicit-float-conversion', ], 'msvc': [ -- cgit v1.2.1