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

Method KeepAboveValue

src/script/api/script_list.cpp:686–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

684}
685
686void ScriptList::KeepAboveValue(SQInteger value)
687{
688 this->modifications++;
689
690 for (ScriptListMap::iterator next_iter, iter = this->items.begin(); iter != this->items.end(); iter = next_iter) {
691 next_iter = std::next(iter);
692 if (iter->second <= value) this->RemoveItem(iter->first);
693 }
694}
695
696void ScriptList::KeepBelowValue(SQInteger value)
697{

Callers

nothing calls this directly

Calls 3

RemoveItemMethod · 0.95
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected