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

Function vector_contains

library/include/MiscUtils.h:194–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192
193template<typename FT, typename KT>
194inline bool vector_contains(const std::vector<FT> &vec, KT key)
195{
196 return binsearch_index(vec, key) >= 0;
197}
198
199template<typename CT, typename FT>
200inline bool vector_contains(const std::vector<CT*> &vec, FT CT::*field, FT key)

Callers 5

autoDFAnnouncementMethod · 0.85
isSquadEquipmentMethod · 0.85
regrass_eventsFunction · 0.85
df_growFunction · 0.85
df_removeplantFunction · 0.85

Calls 1

binsearch_indexFunction · 0.85

Tested by

no test coverage detected