mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-23 23:35:09 +00:00
Reduce more Linq steps
This commit is contained in:
@@ -304,8 +304,7 @@ namespace SabreTools.Serialization.Deserializers
|
||||
|
||||
// Get the full list of unique string offsets
|
||||
var stringOffsets = resourceTable.ResourceTypes
|
||||
.Where(rt => rt != null)
|
||||
.Where(rt => !rt!.IsIntegerType() && rt!.TypeID != 0)
|
||||
.Where(rt => rt != null && rt.TypeID != 0 && !rt.IsIntegerType())
|
||||
.Select(rt => rt!.TypeID)
|
||||
.Union(resourceTable.ResourceTypes
|
||||
.Where(rt => rt != null && rt!.TypeID != 0)
|
||||
|
||||
@@ -1053,8 +1053,7 @@ namespace SabreTools.Serialization.Deserializers
|
||||
if (importTable.ImportLookupTables != null && importLookupTables.Count > 0)
|
||||
{
|
||||
var addresses = importTable.ImportLookupTables
|
||||
.Where(kvp => kvp.Value != null)
|
||||
.SelectMany(kvp => kvp.Value!)
|
||||
.SelectMany(kvp => kvp.Value ?? [])
|
||||
.Where(ilte => ilte != null)
|
||||
.Select(ilte => (int)ilte!.HintNameTableRVA.ConvertVirtualAddress(sections));
|
||||
hintNameTableEntryAddresses.AddRange(addresses);
|
||||
@@ -1064,8 +1063,7 @@ namespace SabreTools.Serialization.Deserializers
|
||||
if (importTable.ImportAddressTables != null && importTable.ImportAddressTables.Count > 0)
|
||||
{
|
||||
var addresses = importTable.ImportAddressTables
|
||||
.Where(kvp => kvp.Value != null)
|
||||
.SelectMany(kvp => kvp.Value!)
|
||||
.SelectMany(kvp => kvp.Value ?? [])
|
||||
.Where(iate => iate != null)
|
||||
.Select(iate => (int)iate!.HintNameTableRVA.ConvertVirtualAddress(sections));
|
||||
hintNameTableEntryAddresses.AddRange(addresses);
|
||||
|
||||
Reference in New Issue
Block a user