Skip to content

Commit

Permalink
refactor: InstructionParser uses LINQ Any
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilien Noal <noal.maximilien@gmail.com>
  • Loading branch information
maximilien-noal committed Jan 18, 2024
1 parent 156761f commit afef003
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ public CfgInstruction ParseInstructionAt(SegmentedAddress address) {
}

private bool HasOperandSize32(IList<InstructionPrefix> prefixes) {
return prefixes.Where(p => p is OperandSize32Prefix).Any();
return prefixes.Any(static p => p is OperandSize32Prefix);
}

private bool HasAddressSize32(IList<InstructionPrefix> prefixes) {
return prefixes.Where(p => p is AddressSize32Prefix).Any();
return prefixes.Any(static p => p is AddressSize32Prefix);
}

private CfgInstruction ParseCfgInstruction(uint physicalAddress, InstructionField<byte> opcodeField,
Expand Down

0 comments on commit afef003

Please sign in to comment.