diff options
| author | Linus Jahn <lnj@kaidan.im> | 2022-06-17 18:26:01 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-06-18 12:45:19 +0200 |
| commit | 31ef165cbbf918ba0ddd00f86c6dee257a0b936b (patch) | |
| tree | e891a37cf70fbc60354d9a9cd69d4e9cb7d34a80 /src/base/QXmppBitsOfBinaryContentId.cpp | |
| parent | 675f57b1d7facab15eff303f022c332a8220777e (diff) | |
| download | qxmpp-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/QXmppBitsOfBinaryContentId.cpp')
| -rw-r--r-- | src/base/QXmppBitsOfBinaryContentId.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/base/QXmppBitsOfBinaryContentId.cpp b/src/base/QXmppBitsOfBinaryContentId.cpp index 5a459114..3810b31f 100644 --- a/src/base/QXmppBitsOfBinaryContentId.cpp +++ b/src/base/QXmppBitsOfBinaryContentId.cpp @@ -123,12 +123,14 @@ bool QXmppBitsOfBinaryContentId::operator==(const QXmppBitsOfBinaryContentId &ot /// Default destructor QXmppBitsOfBinaryContentId::~QXmppBitsOfBinaryContentId() = default; - /// Default copy-constructor QXmppBitsOfBinaryContentId::QXmppBitsOfBinaryContentId(const QXmppBitsOfBinaryContentId &cid) = default; - +/// Default move-constructor +QXmppBitsOfBinaryContentId::QXmppBitsOfBinaryContentId(QXmppBitsOfBinaryContentId &&cid) = default; /// Default assignment operator QXmppBitsOfBinaryContentId &QXmppBitsOfBinaryContentId::operator=(const QXmppBitsOfBinaryContentId &other) = default; +/// Default move-assignment operator +QXmppBitsOfBinaryContentId &QXmppBitsOfBinaryContentId::operator=(QXmppBitsOfBinaryContentId &&other) = default; /// /// Returns a \xep{0231, Bits of Binary} content id |
