Use out parameter modifier code style.

This commit is contained in:
Matthias Mailänder
2022-11-17 22:01:52 +01:00
committed by abcdefg30
parent f013a003a0
commit 847bbf5710

View File

@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Common.Scripting.Global
using (kv.Key)
using (kv.Value)
{
if (!kv.Key.TryGetClrValue(out string variable) || !kv.Value.TryGetClrValue(out object value))
if (!kv.Key.TryGetClrValue<string>(out var variable) || !kv.Value.TryGetClrValue<object>(out var value))
throw new LuaException($"Translation arguments requires a table of [\"string\"]=value pairs. Received {kv.Key.WrappedClrType().Name},{kv.Value.WrappedClrType().Name}");
argumentDictionary.Add(variable, value);