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

Function find

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

Source from the content-addressed store, hash-verified

1887 inline T* insert(const T* it, const T& v) { IM_ASSERT(it >= Data && it <= Data + Size); const ptrdiff_t off = it - Data; if (Size == Capacity) reserve(_grow_capacity(Size + 1)); if (off < (int)Size) memmove(Data + off + 1, Data + off, ((size_t)Size - (size_t)off) * sizeof(T)); memcpy(&Data[off], &v, sizeof(v)); Size++; return Data + off; }
1888 inline bool contains(const T& v) const { const T* data = Data; const T* data_end = Data + Size; while (data < data_end) if (*data++ == v) return true; return false; }
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; }

Callers 5

vector_if_equal_operatorFunction · 0.85
find_eraseFunction · 0.85
find_erase_unsortedFunction · 0.85
valueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected