From da9b7c32ac301d01aca98be532a6f2eb5e31948e Mon Sep 17 00:00:00 2001 From: Yoh Deadfall Date: Wed, 3 Mar 2021 12:56:57 +0100 Subject: [PATCH 1/2] Branchless data index check --- src/Avalonia.Layout/ElementManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Layout/ElementManager.cs b/src/Avalonia.Layout/ElementManager.cs index bf5a45966b..cb13deb15f 100644 --- a/src/Avalonia.Layout/ElementManager.cs +++ b/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) { From e7c5cb10cb6c3f9b55b41c72fcd2af004964a06f Mon Sep 17 00:00:00 2001 From: Rustam Sayfutdinov Date: Fri, 5 Mar 2021 17:08:09 +0300 Subject: [PATCH 2/2] Fix typo in doc for Visual.cs --- src/Avalonia.Visuals/Visual.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Avalonia.Visuals/Visual.cs b/src/Avalonia.Visuals/Visual.cs index 9327531b46..80d4195421 100644 --- a/src/Avalonia.Visuals/Visual.cs +++ b/src/Avalonia.Visuals/Visual.cs @@ -150,7 +150,7 @@ namespace Avalonia public TransformedBounds? TransformedBounds => _transformedBounds; /// - /// Gets a value indicating whether the control should be clipped to its bounds. + /// Gets or sets a value indicating whether the control should be clipped to its bounds. /// public bool ClipToBounds { @@ -191,7 +191,7 @@ namespace Avalonia } /// - /// Gets a value indicating whether this control is visible. + /// Gets or sets a value indicating whether this control is visible. /// public bool IsVisible { @@ -200,7 +200,7 @@ namespace Avalonia } /// - /// Gets the opacity of the control. + /// Gets or sets the opacity of the control. /// public double Opacity { @@ -209,7 +209,7 @@ namespace Avalonia } /// - /// Gets the opacity mask of the control. + /// Gets or sets the opacity mask of the control. /// public IBrush OpacityMask { @@ -218,7 +218,7 @@ namespace Avalonia } /// - /// Gets the render transform of the control. + /// Gets or sets the render transform of the control. /// public ITransform RenderTransform { @@ -227,7 +227,7 @@ namespace Avalonia } /// - /// Gets the transform origin of the control. + /// Gets or sets the transform origin of the control. /// public RelativePoint RenderTransformOrigin { @@ -236,7 +236,7 @@ namespace Avalonia } /// - /// Gets the Z index of the control. + /// Gets or sets the Z index of the control. /// /// /// Controls with a higher will appear in front of controls with