QLocale: remove unneeded c_data static pointer variable

It's the same as locale_data, so use that directly. Saves one
relocation.

Pick-to: 6.4
Task-number: QTBUG-100536
Change-Id: Ic731ad0acfebf10cdf848fc351c08c6536438c62
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2022-07-18 17:41:59 +02:00
parent 74ed70f17a
commit 5983f8d47d

View File

@ -681,10 +681,9 @@ qsizetype qt_repeatCount(QStringView s)
Q_CONSTINIT static const QLocaleData *default_data = nullptr;
static const QLocaleData *const c_data = locale_data;
static QLocalePrivate *c_private()
{
static QLocalePrivate c_locale(c_data, 0, QLocale::OmitGroupSeparator, 1);
static QLocalePrivate c_locale(locale_data, 0, QLocale::OmitGroupSeparator, 1);
return &c_locale;
}
@ -815,7 +814,7 @@ static uint defaultIndex()
const QLocaleData *QLocaleData::c()
{
Q_ASSERT(locale_index[QLocale::C] == 0);
return c_data;
return locale_data;
}
#ifndef QT_NO_DATASTREAM