aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppTuneItem.cpp
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2022-06-17 18:26:01 +0200
committerLinus Jahn <lnj@kaidan.im>2022-06-18 12:45:19 +0200
commit31ef165cbbf918ba0ddd00f86c6dee257a0b936b (patch)
treee891a37cf70fbc60354d9a9cd69d4e9cb7d34a80 /src/base/QXmppTuneItem.cpp
parent675f57b1d7facab15eff303f022c332a8220777e (diff)
downloadqxmpp-31ef165cbbf918ba0ddd00f86c6dee257a0b936b.tar.gz
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.
Diffstat (limited to 'src/base/QXmppTuneItem.cpp')
-rw-r--r--src/base/QXmppTuneItem.cpp6
1 files changed, 4 insertions, 2 deletions
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.