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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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) |
|
|
|
{ |
|
|
|
|