Skip to content

Commit

Permalink
Removed an enumerator GC allocation.
Browse files Browse the repository at this point in the history
  • Loading branch information
zachkinstner committed Jun 14, 2015
1 parent f257970 commit f8a6376
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Core/Solution/Hover.Common/State/BaseItemState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ public void ResetAllCursorInteractions() {
IsSelectionPrevented = false;
vIsInResetState = true;

foreach ( CursorType cursorType in vCursorWorldPosMap.KeysReadOnly ) {
for ( int i = 0 ; i < vCursorWorldPosMap.KeysReadOnly.Count ; i++ ) {
CursorType cursorType = vCursorWorldPosMap.KeysReadOnly[i];

vCursorWorldPosMap[cursorType] = null;
vHighlightDistanceMap[cursorType] = float.MaxValue;
vHighlightProgressMap[cursorType] = 0;
Expand Down

0 comments on commit f8a6376

Please sign in to comment.