MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / FindId

Function FindId

lib/mdflib/mdfviewer/src/childframe.cpp:96–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96wxTreeItemId FindId(const wxTreeCtrl& list, const wxTreeItemId &root, int64_t id) { //NOLINT
97 for (auto item = root; item.IsOk(); item = list.GetNextSibling(item)) {
98 if (GetBlockId(list, item) == id) {
99 return item;
100 }
101 if (list.ItemHasChildren(item)) {
102 wxTreeItemIdValue cookie;
103 auto find = FindId(list, list.GetFirstChild(item, cookie), id);
104 if (find.IsOk()) {
105 return find;
106 }
107 }
108 }
109 return {};
110}
111
112
113} // Empty namespace

Callers 2

RedrawTreeListMethod · 0.85
OnListItemActivatedMethod · 0.85

Calls 2

GetBlockIdFunction · 0.85
IsOkMethod · 0.45

Tested by

no test coverage detected