summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorThiago Macieira <thiago@kde.org>2011-07-05 23:46:19 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-03 07:57:41 +0200
commit5bfeab8749ce6820d55135b81665a7231d3b1504 (patch)
tree152569571114c53d4cdfaa0013307267cb3379a6 /src/opengl
parent5613c9722adee921e16682c0a035f2a7567bd346 (diff)
Make all uses of QBasicAtomicInt and Pointer use load() and store()
Most of these changes are search-and-replace of d->ref ==, d->ref != and d->ref =. The QBasicAtomicPointer in QObjectPrivate::Connection didn't need to be basic, so I made it QAtomicPointer. Change-Id: Ie3271abd1728af599f9ab17c6f4868e475f17bb6 Reviewed-on: http://codereview.qt-project.org/5030 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qglcolormap.cpp2
-rw-r--r--src/opengl/qglcolormap.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/opengl/qglcolormap.cpp b/src/opengl/qglcolormap.cpp
index 492154ffcf..8ff2f9fa0a 100644
--- a/src/opengl/qglcolormap.cpp
+++ b/src/opengl/qglcolormap.cpp
@@ -154,7 +154,7 @@ QGLColormap & QGLColormap::operator=(const QGLColormap &map)
void QGLColormap::detach_helper()
{
QGLColormapData *x = new QGLColormapData;
- x->ref = 1;
+ x->ref.store(1);
x->cmapHandle = 0;
x->cells = 0;
if (d->cells) {
diff --git a/src/opengl/qglcolormap.h b/src/opengl/qglcolormap.h
index d9e6ff98eb..cc8519173b 100644
--- a/src/opengl/qglcolormap.h
+++ b/src/opengl/qglcolormap.h
@@ -94,7 +94,7 @@ private:
inline void QGLColormap::detach()
{
- if (d->ref != 1)
+ if (d->ref.load() != 1)
detach_helper();
}