diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-08-14 13:04:30 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-08-14 15:33:28 (GMT) |
commit | 78fbb9cf6ef5e8440f0453ef60bd7845ce418745 (patch) | |
tree | a8e784f5e6b509b79d88e6fdd4092c4f89517441 /src/corelib/tools/qalgorithms.h | |
parent | a931fac02fe0430439a351dacc5167ddeca1d4d0 (diff) | |
download | Qt-78fbb9cf6ef5e8440f0453ef60bd7845ce418745.zip Qt-78fbb9cf6ef5e8440f0453ef60bd7845ce418745.tar.gz Qt-78fbb9cf6ef5e8440f0453ef60bd7845ce418745.tar.bz2 |
Reimplement qSwap and Q_DECLARE_SHARED differently.
This enables the use of Q_DECLARE_SHARED with d-pointers that are
QExplicitlySharedDataPointer<PrivateClass>.
Also, this enables swapping atomically QSharedPointers.
Reviewed-by: Harald Fernengel
Diffstat (limited to 'src/corelib/tools/qalgorithms.h')
-rw-r--r-- | src/corelib/tools/qalgorithms.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/corelib/tools/qalgorithms.h b/src/corelib/tools/qalgorithms.h index 6f623d9..3e5c3cc 100644 --- a/src/corelib/tools/qalgorithms.h +++ b/src/corelib/tools/qalgorithms.h @@ -141,23 +141,6 @@ inline void qCount(const Container &container, const T &value, Size &n) qCount(container.constBegin(), container.constEnd(), value, n); } - -#if defined Q_CC_MSVC && _MSC_VER < 1300 -template <typename T> -inline void qSwap(T &value1, T &value2) -{ - qSwap_helper<T>(value1, value2, (T *)0); -} -#else -template <typename T> -inline void qSwap(T &value1, T &value2) -{ - T t = value1; - value1 = value2; - value2 = t; -} -#endif - #ifdef qdoc template <typename T> LessThan qLess() |