Apply batch fixing of built-in types using var

This commit is contained in:
Dean Herbert
2021-10-27 13:04:41 +09:00
parent 1d7e97625a
commit 6944151486
263 changed files with 572 additions and 572 deletions

View File

@ -43,7 +43,7 @@ namespace osu.Game.Graphics.Containers
// - If we were to use RelativeSize/FillMode, we'd need to set the Icon's RelativeSizeAxes directly.
// We can't do this because we would need access to AutoSizeAxes to set it to none.
// Other issues come up along the way too, so it's not a good solution.
var fitScale = Math.Min(DrawSize.X / InternalChild.DrawSize.X, DrawSize.Y / InternalChild.DrawSize.Y);
float fitScale = Math.Min(DrawSize.X / InternalChild.DrawSize.X, DrawSize.Y / InternalChild.DrawSize.Y);
InternalChild.Scale = new Vector2(fitScale);
InternalChild.Anchor = Anchor.Centre;
InternalChild.Origin = Anchor.Centre;

View File

@ -109,7 +109,7 @@ namespace osu.Game.Graphics.Containers
{
double elapsedDuration = (double)(Time.Current - startTime);
var amount = (float)Interpolation.ApplyEasing(easing, Math.Min(elapsedDuration / duration, 1));
float amount = (float)Interpolation.ApplyEasing(easing, Math.Min(elapsedDuration / duration, 1));
// Interpolate the position of the logo, where amount 0 is where the logo was when it first began interpolating, and amount 1 is the target location.
Logo.Position = Vector2.Lerp(startPosition.Value, localPos, amount);

View File

@ -182,7 +182,7 @@ namespace osu.Game.Graphics.Containers
protected override bool OnInvalidate(Invalidation invalidation, InvalidationSource source)
{
var result = base.OnInvalidate(invalidation, source);
bool result = base.OnInvalidate(invalidation, source);
if (source == InvalidationSource.Child && (invalidation & Invalidation.DrawSize) != 0)
{
@ -240,7 +240,7 @@ namespace osu.Game.Graphics.Containers
headerBackgroundContainer.Height = expandableHeaderSize + fixedHeaderSize;
headerBackgroundContainer.Y = ExpandableHeader?.Y ?? 0;
var smallestSectionHeight = Children.Count > 0 ? Children.Min(d => d.Height) : 0;
float smallestSectionHeight = Children.Count > 0 ? Children.Min(d => d.Height) : 0;
// scroll offset is our fixed header height if we have it plus 10% of content height
// plus 5% to fix floating point errors and to not have a section instantly unselect when scrolling upwards

View File

@ -40,7 +40,7 @@ namespace osu.Game.Graphics.Containers
public void Select(T item)
{
var newIndex = IndexOf(item);
int newIndex = IndexOf(item);
if (newIndex < 0)
setSelected(null);