MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / vectorIndexOf

Function vectorIndexOf

source/util/vectorutils.h:24–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23template <class vType>
24int vectorIndexOf(const std::vector<vType>& v, const vType& o) {
25 auto itr = std::find(v.begin(), v.end(), o);
26
27 if (itr != v.cend()) {
28 return (int)std::distance(v.begin(), itr);
29 }
30 return -1;
31}
32
33#endif

Callers 6

initMethod · 0.85
removeMethod · 0.85
removeFromParentMethod · 0.85
onDestroyMethod · 0.85
setTransientMethod · 0.85
configureMethod · 0.85

Calls 4

findFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
cendMethod · 0.45

Tested by

no test coverage detected