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/QXmppPubSubEvent.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/base/QXmppPubSubEvent.cpp') diff --git a/src/base/QXmppPubSubEvent.cpp b/src/base/QXmppPubSubEvent.cpp index a0809389..97c5cf61 100644 --- a/src/base/QXmppPubSubEvent.cpp +++ b/src/base/QXmppPubSubEvent.cpp @@ -98,11 +98,13 @@ QXmppPubSubEventBase::QXmppPubSubEventBase(EventType type, const QString &node) /// Default copy-constructor. QXmppPubSubEventBase::QXmppPubSubEventBase(const QXmppPubSubEventBase &other) = default; - +/// Default move-constructor. +QXmppPubSubEventBase::QXmppPubSubEventBase(QXmppPubSubEventBase &&) = default; QXmppPubSubEventBase::~QXmppPubSubEventBase() = default; - /// Default assignment operator. QXmppPubSubEventBase &QXmppPubSubEventBase::operator=(const QXmppPubSubEventBase &other) = default; +/// Default move-assignment operator. +QXmppPubSubEventBase &QXmppPubSubEventBase::operator=(QXmppPubSubEventBase &&) = default; /// /// Returns the event type of the PubSub event. -- cgit v1.2.3