Skip to content

Commit f8a6376

Browse files
committed
Removed an enumerator GC allocation.
1 parent f257970 commit f8a6376

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Core/Solution/Hover.Common/State/BaseItemState.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ public void ResetAllCursorInteractions() {
252252
IsSelectionPrevented = false;
253253
vIsInResetState = true;
254254

255-
foreach ( CursorType cursorType in vCursorWorldPosMap.KeysReadOnly ) {
255+
for ( int i = 0 ; i < vCursorWorldPosMap.KeysReadOnly.Count ; i++ ) {
256+
CursorType cursorType = vCursorWorldPosMap.KeysReadOnly[i];
257+
256258
vCursorWorldPosMap[cursorType] = null;
257259
vHighlightDistanceMap[cursorType] = float.MaxValue;
258260
vHighlightProgressMap[cursorType] = 0;

0 commit comments

Comments
 (0)