1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:57:44 +00:00

LibX86: Mark two InstructionDescriptor functions as const

Thanks clang-tidy
This commit is contained in:
Hendiadyoin1 2021-12-22 16:34:22 +01:00 committed by Brian Gianforcaro
parent 584ba7da13
commit d001f8ba70

View file

@ -205,14 +205,14 @@ struct InstructionDescriptor {
// a non-null slashes member that's indexed by the three R/M bits.
InstructionDescriptor* slashes { nullptr };
unsigned imm1_bytes_for_address_size(bool a32)
unsigned imm1_bytes_for_address_size(bool a32) const
{
if (imm1_bytes == CurrentAddressSize)
return a32 ? 4 : 2;
return imm1_bytes;
}
unsigned imm2_bytes_for_address_size(bool a32)
unsigned imm2_bytes_for_address_size(bool a32) const
{
if (imm2_bytes == CurrentAddressSize)
return a32 ? 4 : 2;