More work refactoring ckint/tryint/isint
This commit is contained in:
@@ -139,13 +139,13 @@ void World::pair_lua_tables(const IdVector &basis, lua_State *master) {
|
||||
if (MLS.isnumber(midx)) continue;
|
||||
// If the synch table doesn't have a number, skip.
|
||||
SLS.rawget(sidx, stnmap, stab);
|
||||
if (!SLS.isnumber(sidx)) continue;
|
||||
int idx = SLS.ckinteger(sidx);
|
||||
assert((idx >= 1) && (idx <= s_ntables));
|
||||
auto idx = SLS.trynumber(sidx);
|
||||
if (!idx) continue;
|
||||
assert((*idx >= 1) && (*idx <= s_ntables));
|
||||
// Pair the tables.
|
||||
MLS.rawset(mtnmap, mtab, idx);
|
||||
MLS.rawset(mntmap, idx, mtab);
|
||||
paired[idx] = true;
|
||||
MLS.rawset(mtnmap, mtab, *idx);
|
||||
MLS.rawset(mntmap, *idx, mtab);
|
||||
paired[*idx] = true;
|
||||
// Potentially pair the metatables.
|
||||
MLS.getmetatable(mval, mtab);
|
||||
if (MLS.istable(mval)) {
|
||||
|
||||
Reference in New Issue
Block a user