From 31ef165cbbf918ba0ddd00f86c6dee257a0b936b Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Fri, 17 Jun 2022 18:26:01 +0200 Subject: Add move constructors and move assignment operators everywhere This is so std::move() on implicitly-shared types actually moves the content and doesn't call the copy ctor/assignment operator. --- src/base/QXmppMamIq.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/base/QXmppMamIq.cpp') diff --git a/src/base/QXmppMamIq.cpp b/src/base/QXmppMamIq.cpp index 3fd3fe42..f49d8d6d 100644 --- a/src/base/QXmppMamIq.cpp +++ b/src/base/QXmppMamIq.cpp @@ -36,11 +36,13 @@ QXmppMamQueryIq::QXmppMamQueryIq() /// Default copy constructor QXmppMamQueryIq::QXmppMamQueryIq(const QXmppMamQueryIq &) = default; - +/// Default move constructor +QXmppMamQueryIq::QXmppMamQueryIq(QXmppMamQueryIq &&) = default; QXmppMamQueryIq::~QXmppMamQueryIq() = default; - /// Default assignemnt operator QXmppMamQueryIq &QXmppMamQueryIq::operator=(const QXmppMamQueryIq &) = default; +/// Default move-assignemnt operator +QXmppMamQueryIq &QXmppMamQueryIq::operator=(QXmppMamQueryIq &&) = default; /// /// Returns the form that specifies the query. @@ -181,13 +183,15 @@ QXmppMamResultIq::QXmppMamResultIq() d->complete = false; } +/// Default move constructor +QXmppMamResultIq::QXmppMamResultIq(QXmppMamResultIq &&) = default; /// Default copy constructor QXmppMamResultIq::QXmppMamResultIq(const QXmppMamResultIq &) = default; - QXmppMamResultIq::~QXmppMamResultIq() = default; - /// Default assignemnt operator QXmppMamResultIq &QXmppMamResultIq::operator=(const QXmppMamResultIq &) = default; +/// Default move-assignemnt operator +QXmppMamResultIq &QXmppMamResultIq::operator=(QXmppMamResultIq &&) = default; /// /// Returns the result set reply for result set management. -- cgit v1.2.3