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/QXmppTuneItem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/base/QXmppTuneItem.cpp') diff --git a/src/base/QXmppTuneItem.cpp b/src/base/QXmppTuneItem.cpp index 36e4fd9b..8bb935fc 100644 --- a/src/base/QXmppTuneItem.cpp +++ b/src/base/QXmppTuneItem.cpp @@ -51,11 +51,13 @@ QXmppTuneItem::QXmppTuneItem() /// Copy-constructor. QXmppTuneItem::QXmppTuneItem(const QXmppTuneItem &other) = default; - +/// Move-constructor. +QXmppTuneItem::QXmppTuneItem(QXmppTuneItem &&) = default; QXmppTuneItem::~QXmppTuneItem() = default; - /// Assignment operator. QXmppTuneItem &QXmppTuneItem::operator=(const QXmppTuneItem &other) = default; +/// Move-assignment operator. +QXmppTuneItem &QXmppTuneItem::operator=(QXmppTuneItem &&) = default; /// /// Returns the artist of the piece or song. -- cgit v1.2.3