MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / VmaVectorRemoveSorted

Function VmaVectorRemoveSorted

other_include/vma/vk_mem_alloc.h:3922–3937  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3920
3921template<typename CmpLess, typename VectorT>
3922bool VmaVectorRemoveSorted(VectorT& vector, const typename VectorT::value_type& value)
3923{
3924 CmpLess comparator;
3925 typename VectorT::iterator it = VmaBinaryFindFirstNotLess(
3926 vector.begin(),
3927 vector.end(),
3928 value,
3929 comparator);
3930 if ((it != vector.end()) && !comparator(*it, value) && !comparator(value, *it))
3931 {
3932 size_t indexToRemove = it - vector.begin();
3933 VmaVectorRemove(vector, indexToRemove);
3934 return true;
3935 }
3936 return false;
3937}
3938#endif // _VMA_FUNCTIONS
3939
3940#ifndef _VMA_STATISTICS_FUNCTIONS

Callers

nothing calls this directly

Calls 4

VmaVectorRemoveFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected