summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qarraydata.h10
-rw-r--r--src/corelib/tools/qarraydataops.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/tools/qarraydata.h b/src/corelib/tools/qarraydata.h
index 71e183e646e..38d1091ac1f 100644
--- a/src/corelib/tools/qarraydata.h
+++ b/src/corelib/tools/qarraydata.h
@@ -39,7 +39,7 @@ struct QArrayData
};
Q_DECLARE_FLAGS(ArrayOptions, ArrayOption)
- QBasicAtomicInt m_ref;
+ QBasicAtomicInt ref_;
ArrayOptions flags;
qsizetype alloc;
@@ -56,19 +56,19 @@ struct QArrayData
/// Returns true if sharing took place
bool ref() noexcept
{
- m_ref.ref();
+ ref_.ref();
return true;
}
/// Returns false if deallocation is necessary
bool deref() noexcept
{
- return m_ref.deref();
+ return ref_.deref();
}
bool isShared() const noexcept
{
- return m_ref.loadRelaxed() != 1;
+ return ref_.loadRelaxed() != 1;
}
// Returns true if a detach is necessary before modifying the data
@@ -76,7 +76,7 @@ struct QArrayData
// detaching is necessary, you should be in a non-const function already
bool needsDetach() noexcept
{
- return m_ref.loadRelaxed() > 1;
+ return ref_.loadRelaxed() > 1;
}
qsizetype detachCapacity(qsizetype newSize) const noexcept
diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h
index 419585b0260..c20abd12c23 100644
--- a/src/corelib/tools/qarraydataops.h
+++ b/src/corelib/tools/qarraydataops.h
@@ -82,7 +82,7 @@ public:
void destroyAll() noexcept // Call from destructors, ONLY!
{
Q_ASSERT(this->d);
- Q_ASSERT(this->d->m_ref.loadRelaxed() == 0);
+ Q_ASSERT(this->d->ref_.loadRelaxed() == 0);
// As this is to be called only from destructor, it doesn't need to be
// exception safe; size not updated.
@@ -345,7 +345,7 @@ public:
// As this is to be called only from destructor, it doesn't need to be
// exception safe; size not updated.
- Q_ASSERT(this->d->m_ref.loadRelaxed() == 0);
+ Q_ASSERT(this->d->ref_.loadRelaxed() == 0);
std::destroy(this->begin(), this->end());
}