Browse Source

LibX86: Mark two InstructionDescriptor functions as const

Thanks clang-tidy
Hendiadyoin1 3 years ago
parent
commit
d001f8ba70
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Userland/Libraries/LibX86/Instruction.h

+ 2 - 2
Userland/Libraries/LibX86/Instruction.h

@@ -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;