summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qarraydata.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-10-09 10:15:00 -0700
committerThiago Macieira <thiago.macieira@intel.com>2023-10-11 08:39:43 +0000
commit25cc336700ab9570f6eb98b9e2f4cadf88f6f9fe (patch)
tree2e924e0c6d2ebd74b6808acac122c1f1ce95e452 /src/corelib/tools/qarraydata.h
parent19f54b901ffbc9108875dc0d7d91138bc9d1c1ed (diff)
QArrayData: remove contradicting const qualifier from needsDetach()
The documentation above says it's intentionally not const and that's how I had designed it. It was added by accident on with the noexcept qualifier on commit c129362b4d9512bd33004d430bc3b817546cb1b7 ("Add a couple of noexcept"). Change-Id: I8f3ce163ccc5408cac39fffd178c7fd237c6e079 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/tools/qarraydata.h')
-rw-r--r--src/corelib/tools/qarraydata.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qarraydata.h b/src/corelib/tools/qarraydata.h
index 766596fe18..adc53fe39d 100644
--- a/src/corelib/tools/qarraydata.h
+++ b/src/corelib/tools/qarraydata.h
@@ -66,7 +66,7 @@ struct QArrayData
// Returns true if a detach is necessary before modifying the data
// This method is intentionally not const: if you want to know whether
// detaching is necessary, you should be in a non-const function already
- bool needsDetach() const noexcept
+ bool needsDetach() noexcept
{
return ref_.loadRelaxed() > 1;
}