Make locale data arrays constexpr

Weirdly, the generator script already has these arrays all as
constexpr...

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-100485
Change-Id: I66d54e097cac1fb6399adfeac155f1e46ff525de
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Marc Mutz 2022-07-18 17:36:30 +02:00
parent fcd96a441d
commit 3174f44579
3 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ QT_BEGIN_NAMESPACE
edited) CLDR data; see qtbase/util/locale_database/.
*/
static const QCalendarLocale locale_data[] = {
static constexpr QCalendarLocale locale_data[] = {
// lang script terr sLong long sShrt short sNarw narow Sizes...
{ 1, 0, 0, 0, 0, 106, 106, 184, 184,106,106, 78, 78, 26, 26 },// C/AnyScript/AnyTerritory
{ 2, 27, 90, 0, 0, 106, 106, 184, 184,106,106, 78, 78, 26, 26 },// Abkhazian/Cyrillic/Georgia
@ -662,7 +662,7 @@ static const QCalendarLocale locale_data[] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },// trailing zeros
};
static const char16_t months_data[] = {
static constexpr char16_t months_data[] = {
0x4d, 0x75, 0x68, 0x61, 0x72, 0x72, 0x61, 0x6d, 0x3b, 0x53, 0x61, 0x66, 0x61, 0x72, 0x3b, 0x52, 0x61, 0x62, 0x69, 0x2bb,
0x20, 0x49, 0x3b, 0x52, 0x61, 0x62, 0x69, 0x2bb, 0x20, 0x49, 0x49, 0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x64, 0x61, 0x20, 0x49,
0x3b, 0x4a, 0x75, 0x6d, 0x61, 0x64, 0x61, 0x20, 0x49, 0x49, 0x3b, 0x52, 0x61, 0x6a, 0x61, 0x62, 0x3b, 0x53, 0x68, 0x61,

View File

@ -33,7 +33,7 @@ QT_BEGIN_NAMESPACE
edited) CLDR data; see qtbase/util/locale_database/.
*/
static const QCalendarLocale locale_data[] = {
static constexpr QCalendarLocale locale_data[] = {
// lang script terr sLong long sShrt short sNarw narow Sizes...
{ 1, 0, 0, 0, 0, 83, 83, 130, 153, 83, 83, 47, 47, 23, 26 },// C/AnyScript/AnyTerritory
{ 2, 27, 90, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Abkhazian/Cyrillic/Georgia
@ -662,7 +662,7 @@ static const QCalendarLocale locale_data[] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },// trailing zeros
};
static const char16_t months_data[] = {
static constexpr char16_t months_data[] = {
0x46, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x4f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x73, 0x68,
0x74, 0x3b, 0x4b, 0x68, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x54, 0x69, 0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x64, 0x61, 0x64,
0x3b, 0x53, 0x68, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x68, 0x72, 0x3b, 0x41, 0x62, 0x61, 0x6e,

View File

@ -33,7 +33,7 @@ QT_BEGIN_NAMESPACE
edited) CLDR data; see qtbase/util/locale_database/.
*/
static const QCalendarLocale locale_data[] = {
static constexpr QCalendarLocale locale_data[] = {
// lang script terr sLong long sShrt short sNarw narow Sizes...
{ 1, 0, 0, 0, 0, 85, 85, 132, 155, 85, 85, 47, 47, 23, 26 },// C/AnyScript/AnyTerritory
{ 2, 27, 90, 181, 181, 181, 181, 155, 155, 47, 47, 47, 47, 26, 26 },// Abkhazian/Cyrillic/Georgia
@ -662,7 +662,7 @@ static const QCalendarLocale locale_data[] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },// trailing zeros
};
static const char16_t months_data[] = {
static constexpr char16_t months_data[] = {
0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x79, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x79, 0x3b, 0x4d, 0x61, 0x72,
0x63, 0x68, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x4a, 0x75, 0x6e, 0x65, 0x3b, 0x4a, 0x75,
0x6c, 0x79, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x3b,