Skip to content

Commit 0bbde17

Browse files
Removed unused functions VmaQuickSort, VmaQuickSortPartition
Closes #262. Thanks @laurelkeys !
1 parent 71b4c18 commit 0bbde17

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

include/vk_mem_alloc.h

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3377,44 +3377,6 @@ static inline bool VmaStrIsEmpty(const char* pStr)
33773377
return pStr == VMA_NULL || *pStr == '\0';
33783378
}
33793379

3380-
#ifndef VMA_SORT
3381-
template<typename Iterator, typename Compare>
3382-
Iterator VmaQuickSortPartition(Iterator beg, Iterator end, Compare cmp)
3383-
{
3384-
Iterator centerValue = end; --centerValue;
3385-
Iterator insertIndex = beg;
3386-
for (Iterator memTypeIndex = beg; memTypeIndex < centerValue; ++memTypeIndex)
3387-
{
3388-
if (cmp(*memTypeIndex, *centerValue))
3389-
{
3390-
if (insertIndex != memTypeIndex)
3391-
{
3392-
VMA_SWAP(*memTypeIndex, *insertIndex);
3393-
}
3394-
++insertIndex;
3395-
}
3396-
}
3397-
if (insertIndex != centerValue)
3398-
{
3399-
VMA_SWAP(*insertIndex, *centerValue);
3400-
}
3401-
return insertIndex;
3402-
}
3403-
3404-
template<typename Iterator, typename Compare>
3405-
void VmaQuickSort(Iterator beg, Iterator end, Compare cmp)
3406-
{
3407-
if (beg < end)
3408-
{
3409-
Iterator it = VmaQuickSortPartition<Iterator, Compare>(beg, end, cmp);
3410-
VmaQuickSort<Iterator, Compare>(beg, it, cmp);
3411-
VmaQuickSort<Iterator, Compare>(it + 1, end, cmp);
3412-
}
3413-
}
3414-
3415-
#define VMA_SORT(beg, end, cmp) VmaQuickSort(beg, end, cmp)
3416-
#endif // VMA_SORT
3417-
34183380
/*
34193381
Returns true if two memory blocks occupy overlapping pages.
34203382
ResourceA must be in less memory offset than ResourceB.

0 commit comments

Comments
 (0)