Use pattern matching
This commit is contained in:
committed by
atlimit8
parent
aed2b8afae
commit
2677e9c013
@@ -55,8 +55,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
foreach (var sequence in kv.Value.Sequences(image))
|
||||
{
|
||||
var s = kv.Value.GetSequence(image, sequence) as FileNotFoundSequence;
|
||||
if (s == null)
|
||||
if (!(kv.Value.GetSequence(image, sequence) is FileNotFoundSequence s))
|
||||
continue;
|
||||
|
||||
Console.WriteLine("\tSequence `{0}.{1}` references sprite `{2}` that does not exist.", image, sequence, s.Filename);
|
||||
|
||||
Reference in New Issue
Block a user