未验证 提交 2445324a 编写于 作者: S Stephen Toub 提交者: GitHub

Add two readonlys to IcuLocaleData.cs (#45367)

上级 296f4de3
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册