QStringConverter: add Q_CONSTINIT to function-level QBasicAtomic
Task-number: QTBUG-100486 Change-Id: Ia55b743fd7ad4716b82425410ed0cf9ff2ee30e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit bd9c7048233e570fbda256fc903684c379421cd6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
9f4f6ae2cb
commit
da2092aef1
@ -306,6 +306,7 @@ struct Q_CORE_EXPORT QLocal8Bit
|
|||||||
static int checkUtf8();
|
static int checkUtf8();
|
||||||
static bool isUtf8()
|
static bool isUtf8()
|
||||||
{
|
{
|
||||||
|
Q_CONSTINIT
|
||||||
static QBasicAtomicInteger<qint8> result = { 0 };
|
static QBasicAtomicInteger<qint8> result = { 0 };
|
||||||
int r = result.loadRelaxed();
|
int r = result.loadRelaxed();
|
||||||
if (r == 0) {
|
if (r == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user