From: Bradley T. Hughes Date: Mon, 3 Oct 2011 08:50:45 +0000 (+0200) Subject: Use QBasicAtomicInt load() and store() instead of implicit casting X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=18c33423a54c24cf13b93115edfd22b6db0f1307;p=konrad%2Fqtdeclarative.git Use QBasicAtomicInt load() and store() instead of implicit casting The implicit casts will be unavailable in the near future Change-Id: Ieab3603e500d3621e65f96d970c9935be7f3aa52 Reviewed-on: http://codereview.qt-project.org/6229 Sanity-Review: Qt Sanity Bot Reviewed-by: Lars Knoll --- diff --git a/src/declarative/qml/v8/qjsvalue_impl_p.h b/src/declarative/qml/v8/qjsvalue_impl_p.h index b0ad766..b7ff6a8 100644 --- a/src/declarative/qml/v8/qjsvalue_impl_p.h +++ b/src/declarative/qml/v8/qjsvalue_impl_p.h @@ -51,15 +51,15 @@ public: QGlobalStaticDeleter(QGlobalStatic &_globalStatic) : globalStatic(_globalStatic) { - globalStatic.pointer->ref.ref(); + globalStatic.pointer.load()->ref.ref(); } inline ~QGlobalStaticDeleter() { - if (!globalStatic.pointer->ref.deref()) { // Logic copy & paste from SharedDataPointer - delete globalStatic.pointer; + if (!globalStatic.pointer.load()->ref.deref()) { // Logic copy & paste from SharedDataPointer + delete globalStatic.pointer.load(); } - globalStatic.pointer = 0; + globalStatic.pointer.store(0); globalStatic.destroyed = true; } };