| 4467 | |
| 4468 | template<typename CmpLess, typename VectorT> |
| 4469 | bool VmaVectorRemoveSorted(VectorT& vector, const typename VectorT::value_type& value) |
| 4470 | { |
| 4471 | CmpLess comparator; |
| 4472 | typename VectorT::iterator it = VmaBinaryFindFirstNotLess( |
| 4473 | vector.begin(), |
| 4474 | vector.end(), |
| 4475 | value, |
| 4476 | comparator); |
| 4477 | if ((it != vector.end()) && !comparator(*it, value) && !comparator(value, *it)) |
| 4478 | { |
| 4479 | size_t indexToRemove = it - vector.begin(); |
| 4480 | VmaVectorRemove(vector, indexToRemove); |
| 4481 | return true; |
| 4482 | } |
| 4483 | return false; |
| 4484 | } |
| 4485 | |
| 4486 | } // namespace |
| 4487 |
nothing calls this directly
no test coverage detected