Skip to content

Commit 46e0125

Browse files
Fix refactoring typos caught by permissive-
While refactoring this algorithm, the unused side (due to being for different usage patterns than those we hit) had issues introduced. Fixes #5189
1 parent 7aa8981 commit 46e0125

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/Common/DataStructures/ClusterList.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class ClusterList
4444
, consolidated(true)
4545
#endif
4646
{
47-
list = AllocatorNewArrayLeaf(TAllocator, this->alloc, indexType, maxCount);
48-
for (indextype i = 0; i < maxIndex; i++)
47+
list = AllocatorNewArrayLeaf(TAllocator, this->alloc, indexType, maxIndex);
48+
for (indexType i = 0; i < maxIndex; i++)
4949
{
5050
list[i] = i;
5151
}
@@ -68,7 +68,7 @@ class ClusterList
6868
{
6969
if (this->list != nullptr)
7070
{
71-
AllocatorDeleteArrayLeaf(TAllocator, this->alloc, maxCount, this->list);
71+
AllocatorDeleteArrayLeaf(TAllocator, this->alloc, maxIndex, this->list);
7272
this->list = nullptr;
7373
}
7474
}
@@ -86,7 +86,7 @@ class ClusterList
8686
// Reset the list; useful if we're re-using the data structure
8787
void Reset()
8888
{
89-
for (indextype i = 0; i < maxIndex; i++)
89+
for (indexType i = 0; i < maxIndex; i++)
9090
{
9191
list[i] = i;
9292
}
@@ -313,7 +313,7 @@ class SegmentClusterList
313313
{
314314
if (backingStore[i] != nullptr)
315315
{
316-
AllocatorDeleteArrayLeaf(TAllocator, alloc, numPerSegment, backingstore[i]);
316+
AllocatorDeleteArrayLeaf(TAllocator, alloc, numPerSegment, backingStore[i]);
317317
backingStore[i] = nullptr;
318318
}
319319
}

0 commit comments

Comments
 (0)