Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5fdbed2

Browse files
committed
Minor codestyle adjustments
1 parent4846d4b commit5fdbed2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎Source/Engine/Core/Collections/HashSetBase.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,14 +408,14 @@ class HashSetBase
408408
}
409409
else
410410
{
411-
const int32 elementsCount = _elementsCount;
412411
// Rebuild entire table completely
412+
const int32 elementsCount = _elementsCount;
413413
const int32 oldSize = _size;
414414
AllocationData oldAllocation;
415415
AllocationUtils::MoveToEmpty<BucketType, AllocationType>(oldAllocation, _allocation, oldSize, oldSize);
416416
_allocation.Allocate(_size);
417417
BucketType* data = _allocation.Get();
418-
for (int32 i =0; i <_size; ++i)
418+
for (int32 i =0; i <oldSize; ++i)
419419
data[i]._state = HashSetBucketState::Empty;
420420
BucketType* oldData = oldAllocation.Get();
421421
FindPositionResult pos;
@@ -430,8 +430,8 @@ class HashSetBase
430430
// Grow and retry to handle pathological cases (eg. heavy collisions)
431431
EnsureCapacity(_size +1,true);
432432
FindPosition(oldBucket.GetKey(), pos);
433+
ASSERT(pos.FreeSlotIndex != -1);
433434
}
434-
ASSERT(pos.FreeSlotIndex != -1);
435435
BucketType& bucket = _allocation.Get()[pos.FreeSlotIndex];
436436
bucket =MoveTemp(oldBucket);
437437
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp