diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2013-11-13 12:01:48 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-14 21:15:35 +0100 |
commit | 4577026397ac15bead5ddcbda4b0a57bae831acb (patch) | |
tree | 2a830336c863fd57af14fd829606e44264144d59 /src/corelib/tools/qtimezone.h | |
parent | 2828072d509fd052aaae18fee59d9b4f5d079717 (diff) |
QTimeZone: add member-swap
This is customary for Qt value types these days.
Change-Id: If5374c2595a904337eaef4afc08cdc993229ac25
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib/tools/qtimezone.h')
-rw-r--r-- | src/corelib/tools/qtimezone.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/tools/qtimezone.h b/src/corelib/tools/qtimezone.h index 1a6a923cf4..7fb4a885ef 100644 --- a/src/corelib/tools/qtimezone.h +++ b/src/corelib/tools/qtimezone.h @@ -87,9 +87,12 @@ public: QTimeZone &operator=(const QTimeZone &other); #ifdef Q_COMPILER_RVALUE_REFS - QTimeZone &operator=(QTimeZone &&other) { std::swap(d, other.d); return *this; } + QTimeZone &operator=(QTimeZone &&other) { swap(other); return *this; } #endif + void swap(QTimeZone &other) + { d.swap(other.d); } + bool operator==(const QTimeZone &other) const; bool operator!=(const QTimeZone &other) const; |