diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2011-10-03 11:40:13 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-10 09:56:51 +0200 |
commit | 78e16f5d46ce77fc871de0323de4cceb0e4a3bee (patch) | |
tree | 1c348dbc8cd676c7db6efca7ae6a69cf7937fb9d | |
parent | 6b3ed00300a56ef42a1267a8a8cf3a4453b4bfbd (diff) |
Use QBasicAtomic*::load() and store() instead of implicit casting
These casts will be unavailable in the near future
Change-Id: I683ae7bf72741f79902945083bf9602ff3655b15
Reviewed-on: http://codereview.qt-project.org/6232
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
-rw-r--r-- | src/3rdparty/phonon/phonon/globalstatic_p.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/3rdparty/phonon/phonon/globalstatic_p.h b/src/3rdparty/phonon/phonon/globalstatic_p.h index cf80512..d615910 100644 --- a/src/3rdparty/phonon/phonon/globalstatic_p.h +++ b/src/3rdparty/phonon/phonon/globalstatic_p.h @@ -260,7 +260,7 @@ static struct PHONON_GLOBAL_STATIC_STRUCT_NAME(NAME) } \ inline TYPE *operator->() \ { \ - TYPE *p = _k_static_##NAME; \ + TYPE *p = _k_static_##NAME.load(); \ if (!p) { \ if (isDestroyed()) { \ qFatal("Fatal Error: Accessed global static '%s *%s()' after destruction. " \ @@ -269,7 +269,7 @@ static struct PHONON_GLOBAL_STATIC_STRUCT_NAME(NAME) p = new TYPE ARGS; \ if (!_k_static_##NAME.testAndSetOrdered(0, p)) { \ delete p; \ - p = _k_static_##NAME; \ + p = _k_static_##NAME.load(); \ } else { \ static Phonon::CleanUpGlobalStatic cleanUpObject = { destroy }; \ } \ @@ -283,8 +283,8 @@ static struct PHONON_GLOBAL_STATIC_STRUCT_NAME(NAME) static void destroy() \ { \ _k_static_##NAME##_destroyed = true; \ - TYPE *x = _k_static_##NAME; \ - _k_static_##NAME = 0; \ + TYPE *x = _k_static_##NAME.load(); \ + _k_static_##NAME.store(0); \ delete x; \ } \ } NAME; |