From 2445324a501efaca19e136b7a7ca46d8ab5d95ec Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Mon, 30 Nov 2020 14:15:08 -0500 Subject: [PATCH] Add two readonlys to IcuLocaleData.cs (#45367) --- .../src/System/Globalization/IcuLocaleData.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/IcuLocaleData.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/IcuLocaleData.cs index 10b5f86a086..b35cecec92a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/IcuLocaleData.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/IcuLocaleData.cs @@ -73,7 +73,7 @@ static void GenerateData (string[] cultures, (string, string)[] lcids) Console.WriteLine("};"); - Console.WriteLine("private static ushort[] s_localesNamesIndexes = new ushort [] {"); + Console.WriteLine("private static readonly ushort[] s_localesNamesIndexes = new ushort [] {"); int max_length = 0; foreach (var entry in indexes) { Debug.Assert(entry.Item1 < Math.Pow (2,12)); @@ -693,7 +693,7 @@ static void GenerateData (string[] cultures, (string, string)[] lcids) // Table which holds index into LocalesNames data and length of the string for each locale // Values are binary searched and need to be sorted alphabetically // - private static ushort[] s_localesNamesIndexes = new ushort[CulturesCount] + private static readonly ushort[] s_localesNamesIndexes = new ushort[CulturesCount] { 0 << 4 | 2, // aa 0 << 4 | 5, // aa-dj -- GitLab