Browse Source

Merge pull request #5598 from YohDeadfall/cheaper-index-check

Branchless data index check
pull/5626/head
Dariusz Komosiński 5 years ago
committed by GitHub
parent
commit
f120f83baa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.Layout/ElementManager.cs

2
src/Avalonia.Layout/ElementManager.cs

@ -207,7 +207,7 @@ namespace Avalonia.Layout
}
}
public bool IsIndexValidInData(int currentIndex) => currentIndex >= 0 && currentIndex < _context.ItemCount;
public bool IsIndexValidInData(int currentIndex) => (uint)currentIndex < _context.ItemCount;
public ILayoutable GetRealizedElement(int dataIndex)
{

Loading…
Cancel
Save