Details
Some cast operations rewritten to use respective macros.
This commit is contained in:
4
ltable.c
4
ltable.c
@@ -107,7 +107,7 @@ static const TValue absentkey = {ABSTKEYCONSTANT};
|
||||
*/
|
||||
static Node *hashint (const Table *t, lua_Integer i) {
|
||||
lua_Unsigned ui = l_castS2U(i);
|
||||
if (ui <= (unsigned int)INT_MAX)
|
||||
if (ui <= cast_uint(INT_MAX))
|
||||
return hashmod(t, cast_int(ui));
|
||||
else
|
||||
return hashmod(t, ui);
|
||||
@@ -488,7 +488,7 @@ static void setnodevector (lua_State *L, Table *t, unsigned int size) {
|
||||
luaG_runerror(L, "table overflow");
|
||||
size = twoto(lsize);
|
||||
t->node = luaM_newvector(L, size, Node);
|
||||
for (i = 0; i < (int)size; i++) {
|
||||
for (i = 0; i < cast_int(size); i++) {
|
||||
Node *n = gnode(t, i);
|
||||
gnext(n) = 0;
|
||||
setnilkey(n);
|
||||
|
||||
Reference in New Issue
Block a user