MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / Find_

Function Find_

IntelPresentMon/CommonUtilities/log/Channel.cpp:48–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 // find in vector with tag
47 template<typename T>
48 std::shared_ptr<T> Find_(const std::vector<std::pair<std::string, std::shared_ptr<T>>>& vec, const std::string& tag)
49 {
50 if (tag.empty()) {
51 return {};
52 }
53 else {
54 using PairType = std::decay_t<decltype(vec)>::value_type;
55 if (auto i = rn::find(vec, tag, &PairType::first); i != vec.end()) {
56 return i->second;
57 }
58 else {
59 return {};
60 }
61 }
62 }
63 // command packets that can be put on the entry queue in place of log entries
64 // used to control the worker thread. Each packet encodes what functionality
65 // to call in the variant visit routine

Callers 1

GetComponentBlockingMethod · 0.85

Calls 2

emptyMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected