aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppVCardIq.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/QXmppVCardIq.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/QXmppVCardIq.cpp')
-rw-r--r--src/base/QXmppVCardIq.cpp28
1 files changed, 9 insertions, 19 deletions
diff --git a/src/base/QXmppVCardIq.cpp b/src/base/QXmppVCardIq.cpp
index 423918ba..4abec8ba 100644
--- a/src/base/QXmppVCardIq.cpp
+++ b/src/base/QXmppVCardIq.cpp
@@ -42,30 +42,20 @@ public:
};
/// Constructs an empty address.
-
QXmppVCardAddress::QXmppVCardAddress()
: d(new QXmppVCardAddressPrivate)
{
}
-/// Constructs a copy of \a other.
-
-QXmppVCardAddress::QXmppVCardAddress(const QXmppVCardAddress &other)
- : d(other.d)
-{
-}
-
-QXmppVCardAddress::~QXmppVCardAddress()
-{
-}
-
-/// Assigns \a other to this address.
-
-QXmppVCardAddress &QXmppVCardAddress::operator=(const QXmppVCardAddress &other)
-{
- d = other.d;
- return *this;
-}
+/// Copy-constructor
+QXmppVCardAddress::QXmppVCardAddress(const QXmppVCardAddress &other) = default;
+/// Move-constructor
+QXmppVCardAddress::QXmppVCardAddress(QXmppVCardAddress &&) = default;
+QXmppVCardAddress::~QXmppVCardAddress() = default;
+/// Assignment operator.
+QXmppVCardAddress &QXmppVCardAddress::operator=(const QXmppVCardAddress &other) = default;
+/// Move-assignment operator.
+QXmppVCardAddress &QXmppVCardAddress::operator=(QXmppVCardAddress &&) = default;
/// \brief Checks if two address objects represent the same address.