Use pattern matching

This commit is contained in:
Eduardo Cáceres
2022-05-02 13:11:49 +02:00
committed by atlimit8
parent aed2b8afae
commit 2677e9c013
15 changed files with 83 additions and 90 deletions

View File

@@ -86,8 +86,7 @@ namespace OpenRA.Scripting
{
foreach (var arg in clrArgs)
{
var table = arg as LuaValue[];
if (table == null)
if (!(arg is LuaValue[] table))
continue;
foreach (var value in table)