MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / findControlById

Method findControlById

game/ui/base/transactionscreen.cpp:731–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

729bool TransactionScreen::isTransition() { return false; }
730
731sp<TransactionControl> TransactionScreen::findControlById(Type type, const UString &itemId)
732{
733 auto it =
734 std::find_if(transactionControls[type].begin(), transactionControls[type].end(),
735 [itemId](const sp<TransactionControl> &c) { return c->itemId == itemId; });
736 if (it != transactionControls[type].end())
737 {
738 return *it;
739 }
740 return {};
741}
742sp<TransactionControl> TransactionScreen::findControlById(const UString &itemId)
743{
744 static const std::array<Type, 9> types{

Callers

nothing calls this directly

Calls 2

endMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected