MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / find_erase

Function find_erase

extern/imgui/imgui.h:1891–1891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1889 inline T* find(const T& v) { T* data = Data; const T* data_end = Data + Size; while (data < data_end) if (*data == v) break; else ++data; return data; }
1890 inline const T* find(const T& v) const { const T* data = Data; const T* data_end = Data + Size; while (data < data_end) if (*data == v) break; else ++data; return data; }
1891 inline bool find_erase(const T& v) { const T* it = find(v); if (it < Data + Size) { erase(it); return true; } return false; }
1892 inline bool find_erase_unsorted(const T& v) { const T* it = find(v); if (it < Data + Size) { erase_unsorted(it); return true; } return false; }
1893 inline int index_from_ptr(const T* it) const { IM_ASSERT(it >= Data && it < Data + Size); const ptrdiff_t off = it - Data; return (int)off; }
1894};

Callers

nothing calls this directly

Calls 2

findFunction · 0.85
eraseFunction · 0.85

Tested by

no test coverage detected