use HasExtension method instead of string.EndsWith.

This commit is contained in:
morkt
2017-04-10 23:15:13 +04:00
parent e0a5e95081
commit 31a01f2e5d
72 changed files with 105 additions and 114 deletions

View File

@@ -68,7 +68,7 @@ namespace GameRes.Formats.RealLive
public override ArcFile TryOpen (ArcView file)
{
if (!file.Name.EndsWith (".g00", StringComparison.InvariantCultureIgnoreCase))
if (!file.Name.HasExtension (".g00"))
return null;
if (file.View.ReadByte (0) != 2)
return null;

View File

@@ -41,7 +41,7 @@ namespace GameRes.Formats.RealLive
public override ArcFile TryOpen (ArcView file)
{
if (!file.Name.EndsWith (".ovk", StringComparison.InvariantCultureIgnoreCase))
if (!file.Name.HasExtension (".ovk"))
return null;
int count = file.View.ReadInt32 (0);
if (!IsSaneCount (count))