(WriteImageEntry): tweaked linq query syntax.

This commit is contained in:
morkt 2014-08-02 11:24:00 +04:00
parent 36dce512ac
commit f6bb4716a6

View File

@ -294,7 +294,7 @@ namespace GameRes.Formats
uint WriteImageEntry (PackedEntry entry, Stream input, Stream output) uint WriteImageEntry (PackedEntry entry, Stream input, Stream output)
{ {
var grp = FormatCatalog.Instance.LookupExtension<GrpFormat> ("GRP").FirstOrDefault(); var grp = FormatCatalog.Instance.ImageFormats.OfType<GrpFormat>().FirstOrDefault();
if (null == grp) // probably never happens if (null == grp) // probably never happens
throw new FileFormatException ("GRP image encoder not available"); throw new FileFormatException ("GRP image encoder not available");
bool is_grp = grp.Signature == FormatCatalog.ReadSignature (input); bool is_grp = grp.Signature == FormatCatalog.ReadSignature (input);