瀏覽代碼

LibX86: Mark two InstructionDescriptor functions as const

Thanks clang-tidy
Hendiadyoin1 3 年之前
父節點
當前提交
d001f8ba70
共有 1 個文件被更改,包括 2 次插入2 次删除
  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;