From e7f0f3b834f2b71d0fd9afa3296113199193f166 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Sun, 15 Oct 2017 03:41:34 +0100 Subject: [PATCH] add move constructor to obj_ref --- src/util/obj_ref.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/obj_ref.h b/src/util/obj_ref.h index 1aa562a8f..72762ea5b 100644 --- a/src/util/obj_ref.h +++ b/src/util/obj_ref.h @@ -53,6 +53,10 @@ public: inc_ref(); } + obj_ref(obj_ref && other) : m_obj(0), m_manager(other.m_manager) { + std::swap(m_obj, other.m_obj); + } + ~obj_ref() { dec_ref(); } TManager & get_manager() const { return m_manager; }