From 1f0e73906eb92731b790a3f3b1f9131262d193f3 Mon Sep 17 00:00:00 2001 From: Gustas Date: Wed, 18 Oct 2023 22:10:01 +0300 Subject: [PATCH] Fix static linting --- OpenRA.Mods.Common/Lint/CheckTranslationReference.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Lint/CheckTranslationReference.cs b/OpenRA.Mods.Common/Lint/CheckTranslationReference.cs index f759bab059..387772d0d9 100644 --- a/OpenRA.Mods.Common/Lint/CheckTranslationReference.cs +++ b/OpenRA.Mods.Common/Lint/CheckTranslationReference.cs @@ -111,7 +111,7 @@ namespace OpenRA.Mods.Common.Lint { foreach (var fieldInfo in modType.GetFields(Binding).Where(m => Utility.HasAttribute(m))) { - if (fieldInfo.IsInitOnly) + if (fieldInfo.IsInitOnly || !fieldInfo.IsStatic) continue; if (fieldInfo.FieldType != typeof(string)) @@ -120,7 +120,7 @@ namespace OpenRA.Mods.Common.Lint continue; } - var key = (string)fieldInfo.GetValue(string.Empty); + var key = (string)fieldInfo.GetValue(null); if (referencedKeys.Contains(key)) continue;