diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-01-11 15:38:30 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-01-11 15:38:30 -0200 |
commit | cef96b73e1820e0f0d65f1616284ec40502e5e44 (patch) | |
tree | 7036713ddbf9fe30e363c5092e38e14cbc95d47a /lcode.c | |
parent | 427e01eb63079e8cf3a41ec03e7aad7d79fc6406 (diff) | |
download | lua-cef96b73e1820e0f0d65f1616284ec40502e5e44.tar.gz lua-cef96b73e1820e0f0d65f1616284ec40502e5e44.tar.bz2 lua-cef96b73e1820e0f0d65f1616284ec40502e5e44.zip |
added casts from int to enumerations to follow C++ rules
Diffstat (limited to 'lcode.c')
-rw-r--r-- | lcode.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lcode.c,v 2.41 2009/08/10 15:31:44 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.42 2009/09/23 20:33:05 roberto Exp roberto $ |
3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -830,15 +830,15 @@ void luaK_posfix (FuncState *fs, BinOpr op, expdesc *e1, expdesc *e2) { | |||
830 | } | 830 | } |
831 | case OPR_ADD: case OPR_SUB: case OPR_MUL: case OPR_DIV: | 831 | case OPR_ADD: case OPR_SUB: case OPR_MUL: case OPR_DIV: |
832 | case OPR_MOD: case OPR_POW: { | 832 | case OPR_MOD: case OPR_POW: { |
833 | codearith(fs, op - OPR_ADD + OP_ADD, e1, e2); | 833 | codearith(fs, cast(OpCode, op - OPR_ADD + OP_ADD), e1, e2); |
834 | break; | 834 | break; |
835 | } | 835 | } |
836 | case OPR_EQ: case OPR_LT: case OPR_LE: { | 836 | case OPR_EQ: case OPR_LT: case OPR_LE: { |
837 | codecomp(fs, op - OPR_EQ + OP_EQ, 1, e1, e2); | 837 | codecomp(fs, cast(OpCode, op - OPR_EQ + OP_EQ), 1, e1, e2); |
838 | break; | 838 | break; |
839 | } | 839 | } |
840 | case OPR_NE: case OPR_GT: case OPR_GE: { | 840 | case OPR_NE: case OPR_GT: case OPR_GE: { |
841 | codecomp(fs, op - OPR_NE + OP_EQ, 0, e1, e2); | 841 | codecomp(fs, cast(OpCode, op - OPR_NE + OP_EQ), 0, e1, e2); |
842 | break; | 842 | break; |
843 | } | 843 | } |
844 | default: lua_assert(0); | 844 | default: lua_assert(0); |