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

Method KeepBelowValue

src/script/api/script_list.cpp:696–704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

694}
695
696void ScriptList::KeepBelowValue(SQInteger value)
697{
698 this->modifications++;
699
700 for (ScriptListMap::iterator next_iter, iter = this->items.begin(); iter != this->items.end(); iter = next_iter) {
701 next_iter = std::next(iter);
702 if (iter->second >= value) this->RemoveItem(iter->first);
703 }
704}
705
706void ScriptList::KeepBetweenValue(SQInteger start, SQInteger end)
707{

Callers

nothing calls this directly

Calls 3

RemoveItemMethod · 0.95
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected