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

Method findRef

library/Types.cpp:58–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58df::general_ref *DFHack::findRef(std::vector<df::general_ref*> &vec, df::general_ref_type type)
59{
60 for (int i = vec.size()-1; i >= 0; i--)
61 {
62 df::general_ref *ref = vec[i];
63 if (ref->getType() == type)
64 return ref;
65 }
66
67 return NULL;
68}
69
70bool DFHack::removeRef(std::vector<df::general_ref*> &vec, df::general_ref_type type, int id)
71{

Callers

nothing calls this directly

Calls 2

getTypeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected