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

Function GetBlockId

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

Source from the content-addressed store, hash-verified

86}
87
88int64_t GetBlockId(const wxTreeCtrl& list, const wxTreeItemId& item) {
89 if (!item.IsOk()) {
90 return -1;
91 }
92 const auto* data = dynamic_cast<const BlockAddress*>(list.GetItemData(item));
93 return data != nullptr ? data->FilePosition() : -1;
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)) {

Callers 3

FindIdFunction · 0.85
OnTreeSelectedMethod · 0.85
OnListItemActivatedMethod · 0.85

Calls 2

IsOkMethod · 0.45
FilePositionMethod · 0.45

Tested by

no test coverage detected