Browse Source

remove some redundant returns (#19137)

Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
pull/19147/head
Simon Cropp 1 year ago
committed by GitHub
parent
commit
d0e3e765c3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/Avalonia.Base/Animation/Animators/BoolAnimator.cs
  2. 2
      src/Avalonia.Controls/Automation/Peers/SelectingItemsControlAutomationPeer.cs
  3. 7
      src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/AvaloniaXamlIlLanguageParseIntrinsics.cs

2
src/Avalonia.Base/Animation/Animators/BoolAnimator.cs

@ -10,8 +10,6 @@
{ {
if(progress >= 1d) if(progress >= 1d)
return newValue; return newValue;
if(progress >= 0)
return oldValue;
return oldValue; return oldValue;
} }
} }

2
src/Avalonia.Controls/Automation/Peers/SelectingItemsControlAutomationPeer.cs

@ -48,8 +48,6 @@ namespace Avalonia.Automation.Peers
} }
} }
} }
return result;
} }
return result; return result;

7
src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/AvaloniaXamlIlLanguageParseIntrinsics.cs

@ -421,7 +421,7 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions
return ReturnOnParseError($"x:Array element {element.Type.GetClrType().Name} is not assignable to the array element type {elementType.Name}", out result); return ReturnOnParseError($"x:Array element {element.Type.GetClrType().Name} is not assignable to the array element type {elementType.Name}", out result);
} }
} }
if (types.AvaloniaList.MakeGenericType(elementType).IsAssignableFrom(type)) if (types.AvaloniaList.MakeGenericType(elementType).IsAssignableFrom(type))
{ {
result = new AvaloniaXamlIlAvaloniaListConstantAstNode(node, types, type, elementType, nodes); result = new AvaloniaXamlIlAvaloniaListConstantAstNode(node, types, type, elementType, nodes);
@ -439,11 +439,8 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions
result = new AvaloniaXamlIlArrayConstantAstNode(node, listType, elementType, nodes); result = new AvaloniaXamlIlArrayConstantAstNode(node, listType, elementType, nodes);
return true; return true;
} }
result = null;
return false;
} }
result = null; result = null;
return false; return false;
} }

Loading…
Cancel
Save