MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / RemoveItem

Method RemoveItem

src/script/api/script_list.cpp:435–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435void ScriptList::RemoveItem(SQInteger item)
436{
437 this->modifications++;
438
439 auto item_iter = this->items.find(item);
440 if (item_iter == this->items.end()) return;
441
442 SQInteger value = item_iter->second;
443
444 this->sorter->Remove(item);
445 auto value_iter = this->values.find({value, item});
446 assert(value_iter != this->values.end());
447 this->values.erase(value_iter);
448 this->items.erase(item_iter);
449}
450
451SQInteger ScriptList::Begin()
452{

Callers 14

RemoveAboveValueMethod · 0.95
RemoveBelowValueMethod · 0.95
RemoveBetweenValueMethod · 0.95
RemoveValueMethod · 0.95
RemoveTopMethod · 0.95
RemoveBottomMethod · 0.95
RemoveListMethod · 0.95
KeepAboveValueMethod · 0.95
KeepBelowValueMethod · 0.95
KeepBetweenValueMethod · 0.95
KeepValueMethod · 0.95
_setMethod · 0.95

Calls 4

findMethod · 0.45
endMethod · 0.45
RemoveMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected