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/QXmppBitsOfBinaryData.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/base/QXmppBitsOfBinaryData.cpp') diff --git a/src/base/QXmppBitsOfBinaryData.cpp b/src/base/QXmppBitsOfBinaryData.cpp index 3486554d..51f20bc4 100644 --- a/src/base/QXmppBitsOfBinaryData.cpp +++ b/src/base/QXmppBitsOfBinaryData.cpp @@ -50,12 +50,14 @@ QXmppBitsOfBinaryData::QXmppBitsOfBinaryData() /// Default copy-constructor QXmppBitsOfBinaryData::QXmppBitsOfBinaryData(const QXmppBitsOfBinaryData &) = default; - +/// Default move-constructor +QXmppBitsOfBinaryData::QXmppBitsOfBinaryData(QXmppBitsOfBinaryData &&) = default; /// Default destructor QXmppBitsOfBinaryData::~QXmppBitsOfBinaryData() = default; - /// Default assignment operator QXmppBitsOfBinaryData &QXmppBitsOfBinaryData::operator=(const QXmppBitsOfBinaryData &) = default; +/// Default move-assignment operator +QXmppBitsOfBinaryData &QXmppBitsOfBinaryData::operator=(QXmppBitsOfBinaryData &&) = default; /// /// Returns the content id of the data -- cgit v1.2.3