MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / TryGetValue

Method TryGetValue

pcsx2/DEV9/ThreadSafeMap.h:70–85  ·  view source on GitHub ↗

Does not error or insert if no key is found

Source from the content-addressed store, hash-verified

68
69 //Does not error or insert if no key is found
70 bool TryGetValue(Key key, T* value)
71 {
72#ifdef NO_SHARED_MUTEX
73 std::unique_lock readLock(accessMutex);
74#else
75 std::shared_lock readLock(accessMutex);
76#endif
77 auto search = map.find(key);
78 if (search != map.end())
79 {
80 *value = map[key];
81 return true;
82 }
83 else
84 return false;
85 }
86
87 bool ContainsKey(Key key)
88 {

Callers 7

recvMethod · 0.45
resetMethod · 0.45
SendICMPMethod · 0.45
SendUDPMethod · 0.45
SendFromConnectionMethod · 0.45
~SocketAdapterMethod · 0.45
SendMethod · 0.45

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected