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/QXmppRegisterIq.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/base/QXmppRegisterIq.cpp') diff --git a/src/base/QXmppRegisterIq.cpp b/src/base/QXmppRegisterIq.cpp index 5103b22f..b5cdee77 100644 --- a/src/base/QXmppRegisterIq.cpp +++ b/src/base/QXmppRegisterIq.cpp @@ -43,11 +43,13 @@ QXmppRegisterIq::QXmppRegisterIq() /// Default copy-constructor QXmppRegisterIq::QXmppRegisterIq(const QXmppRegisterIq &other) = default; - +/// Default move-constructor +QXmppRegisterIq::QXmppRegisterIq(QXmppRegisterIq &&) = default; QXmppRegisterIq::~QXmppRegisterIq() = default; - /// Default assignment operator QXmppRegisterIq &QXmppRegisterIq::operator=(const QXmppRegisterIq &other) = default; +/// Default move-assignment operator +QXmppRegisterIq &QXmppRegisterIq::operator=(QXmppRegisterIq &&) = default; /// Constructs a regular change password request. /// -- cgit v1.2.3