diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2011-09-29 11:50:08 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-27 18:57:38 +0200 |
commit | 6476ac738ca029af95932f53b53f0705808eb80e (patch) | |
tree | d1884397040eb65d23a48a0e1a56dad3f476cf34 /src/gui/painting/qpen.cpp | |
parent | 434824aede28e8c36d6991aa218f89daf2cc22fa (diff) |
Replace implicit QAtomic* casts with explicit load()/store()
Change-Id: Ia7ef1a8e01001f203e409c710c977d6f4686342e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/painting/qpen.cpp')
-rw-r--r-- | src/gui/painting/qpen.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp index a79e3a0cd2..5a4582e31e 100644 --- a/src/gui/painting/qpen.cpp +++ b/src/gui/painting/qpen.cpp @@ -230,10 +230,9 @@ typedef QPenPrivate QPenData; */ inline QPenPrivate::QPenPrivate(const QBrush &_brush, qreal _width, Qt::PenStyle penStyle, Qt::PenCapStyle _capStyle, Qt::PenJoinStyle _joinStyle) - : dashOffset(0), miterLimit(2), + : ref(1), dashOffset(0), miterLimit(2), cosmetic(false) { - ref = 1; width = _width; brush = _brush; style = penStyle; @@ -353,7 +352,7 @@ QPen::~QPen() void QPen::detach() { - if (d->ref == 1) + if (d->ref.load() == 1) return; QPenData *x = new QPenData(*static_cast<QPenData *>(d)); @@ -860,7 +859,7 @@ bool QPen::operator==(const QPen &p) const bool QPen::isDetached() { - return d->ref == 1; + return d->ref.load() == 1; } |