From 25cc336700ab9570f6eb98b9e2f4cadf88f6f9fe Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 9 Oct 2023 10:15:00 -0700 Subject: [PATCH] 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 --- src/corelib/tools/qarraydata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }