浏览代码

[C++ Warning]: W8084 Suggest parentheses to clarify precedence.

Roberto Ierusalimschy 25 年之前
父节点
当前提交
c9f91c6fe3
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lopcodes.h

+ 2 - 2
lopcodes.h

@@ -1,5 +1,5 @@
 /*
-** $Id: lopcodes.h,v 1.58 2000/04/13 16:51:01 roberto Exp roberto $
+** $Id: lopcodes.h,v 1.59 2000/04/14 17:45:25 roberto Exp roberto $
 ** Opcodes for Lua virtual machine
 ** See Copyright Notice in lua.h
 */
@@ -51,7 +51,7 @@
 #define GET_OPCODE(i)	((OpCode)((i)&MASK1(SIZE_OP,0)))
 #define SET_OPCODE(i,o)	((i) = (((i)&MASK0(SIZE_OP,0)) | (Instruction)(o)))
 
-#define CREATE_U(o,u)	 ((Instruction)(o) | (Instruction)(u)<<POS_U)
+#define CREATE_U(o,u)	 ((Instruction)(o) | ((Instruction)(u)<<POS_U))
 #define GETARG_U(i)	((int)((i)>>POS_U))
 #define SETARG_U(i,u)	((i) = (((i)&MASK0(SIZE_U,POS_U)) | \
                                ((Instruction)(u)<<POS_U)))