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>bb10
parent
2828072d50
commit
4577026397
|
|
@ -422,6 +422,13 @@ QTimeZone &QTimeZone::operator=(const QTimeZone &other)
|
|||
return *this;
|
||||
}
|
||||
|
||||
/*
|
||||
\fn void QTimeZone::swap(QTimeZone &other)
|
||||
|
||||
Swaps this timezone with \a other. This function is very fast and
|
||||
never fails.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QTimeZone &QTimeZone::operator=(QTimeZone &&other)
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue