MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / find

Method find

include/reactphysics3d/containers/Array.h:327–336  ·  view source on GitHub ↗

Try to find a given item of the array and return an iterator pointing to that element if it exists in the array. Otherwise, this method returns the end() iterator

Source from the content-addressed store, hash-verified

325 /// pointing to that element if it exists in the array. Otherwise,
326 /// this method returns the end() iterator
327 Iterator find(const T& element) {
328
329 for (uint64 i=0; i<mSize; i++) {
330 if (element == mBuffer[i]) {
331 return Iterator(mBuffer, i, mSize);
332 }
333 }
334
335 return end();
336 }
337
338 /// Look for an element in the array and remove it
339 Iterator remove(const T& element) {

Callers

nothing calls this directly

Calls 1

IteratorClass · 0.70

Tested by

no test coverage detected