summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qarraydatapointer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qarraydatapointer.h')
-rw-r--r--src/corelib/tools/qarraydatapointer.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/corelib/tools/qarraydatapointer.h b/src/corelib/tools/qarraydatapointer.h
index ffeaff5862..b7236d485a 100644
--- a/src/corelib/tools/qarraydatapointer.h
+++ b/src/corelib/tools/qarraydatapointer.h
@@ -126,11 +126,6 @@ public:
return d;
}
- bool needsDetach() const
- {
- return (!d->isMutable() || d->ref.isShared());
- }
-
void swap(QArrayDataPointer &other) noexcept
{
qSwap(d, other.d);
@@ -144,7 +139,7 @@ public:
bool detach()
{
- if (needsDetach()) {
+ if (d->needsDetach()) {
Data *copy = clone(d->detachFlags());
QArrayDataPointer old(d);
d = copy;