bool include_data = false;
bool accept_overlap = false;
if (lua_isboolean(L, 4)) {
- accept_overlap = lua_toboolean(L, 4);
+ accept_overlap = readParam<bool>(L, 4);
get_data_and_border_flags(L, 5, &include_borders, &include_data);
}
std::vector<Area *> res;
if (lua_isnumber(L, 5))
a.id = lua_tonumber(L, 5);
+ // Insert & assign a new ID if necessary
if (!ast->insertArea(&a))
return 0;
NO_MAP_LOCK_REQUIRED;
LuaAreaStore *o = (lua_isstring(L, 1)) ?
- new LuaAreaStore(lua_tostring(L, 1)) :
+ new LuaAreaStore(readParam<std::string>(L, 1)) :
new LuaAreaStore();
*(void **)(lua_newuserdata(L, sizeof(void *))) = o;