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

Method KeepBetweenValue

src/script/api/script_list.cpp:706–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

704}
705
706void ScriptList::KeepBetweenValue(SQInteger start, SQInteger end)
707{
708 this->modifications++;
709
710 for (ScriptListMap::iterator next_iter, iter = this->items.begin(); iter != this->items.end(); iter = next_iter) {
711 next_iter = std::next(iter);
712 if (iter->second <= start || iter->second >= end) this->RemoveItem(iter->first);
713 }
714}
715
716void ScriptList::KeepValue(SQInteger value)
717{

Callers

nothing calls this directly

Calls 3

RemoveItemMethod · 0.95
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected