| 331 | |
| 332 | |
| 333 | bool ScriptList::SaveObject(HSQUIRRELVM vm) |
| 334 | { |
| 335 | sq_pushstring(vm, "List"); |
| 336 | sq_newarray(vm, 0); |
| 337 | sq_pushinteger(vm, this->sorter_type); |
| 338 | sq_arrayappend(vm, -2); |
| 339 | sq_pushbool(vm, this->sort_ascending ? SQTrue : SQFalse); |
| 340 | sq_arrayappend(vm, -2); |
| 341 | sq_newtable(vm); |
| 342 | for (const auto &item : this->items) { |
| 343 | sq_pushinteger(vm, item.first); |
| 344 | sq_pushinteger(vm, item.second); |
| 345 | sq_rawset(vm, -3); |
| 346 | } |
| 347 | sq_arrayappend(vm, -2); |
| 348 | return true; |
| 349 | } |
| 350 | |
| 351 | bool ScriptList::LoadObject(HSQUIRRELVM vm) |
| 352 | { |
nothing calls this directly
no test coverage detected