MCPcopy Create free account
hub / github.com/DFHack/dfhack / map_find

Function map_find

library/include/MiscUtils.h:351–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349
350template<typename T>
351inline typename T::mapped_type map_find(
352 const T &map, const typename T::key_type &key,
353 const typename T::mapped_type &defval = typename T::mapped_type()
354) {
355 auto it = map.find(key);
356 return (it == map.end()) ? defval : it->second;
357}
358
359template <class T, typename Fn>
360static void for_each_(std::vector<T> &v, Fn func)

Callers 5

getFocusStringsMethod · 0.85
place_orphanMethod · 0.85
form_veinsMethod · 0.85
estimate_undergroundFunction · 0.85
add_materialsFunction · 0.85

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by 2

estimate_undergroundFunction · 0.68
add_materialsFunction · 0.68