Browse Source

Branchless data index check

pull/5598/head
Yoh Deadfall 6 years ago
parent
commit
da9b7c32ac
  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