MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / findOptionally

Function findOptionally

lib/core/globals.h:84–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83template <typename K, typename V>
84inline const std::optional<V> findOptionally(
85 const std::map<K, V>& map, const K& key, const V& defaultValue = V())
86{
87 auto it = map.find(key);
88 if (it == map.end())
89 return std::nullopt;
90 return std::make_optional(it->second);
91}
92
93#endif

Callers 2

initMethod · 0.85
drawContentMethod · 0.85

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected