Fix IDE0004

This commit is contained in:
RoosterDragon
2023-02-19 09:55:33 +00:00
committed by Gustas
parent a4f9ceaf09
commit 71ce515d6d
12 changed files with 16 additions and 13 deletions

View File

@@ -22,7 +22,7 @@ namespace OpenRA
public readonly struct WAngle : IScriptBindable, ILuaAdditionBinding, ILuaSubtractionBinding, ILuaEqualityBinding, IEquatable<WAngle>
{
public readonly int Angle;
public int AngleSquared => (int)Angle * Angle;
public int AngleSquared => Angle * Angle;
public WAngle(int a)
{

View File

@@ -66,7 +66,7 @@ namespace OpenRA
// Add an additional quadratic variation to height
// Uses decimal to avoid integer overflow
var offset = (decimal)(b - a).Length * pitch.Tan() * mul * (div - mul) / (1024 * div * div);
var clampedOffset = (int)(offset + (decimal)ret.Z).Clamp((decimal)int.MinValue, (decimal)int.MaxValue);
var clampedOffset = (int)(offset + ret.Z).Clamp(int.MinValue, int.MaxValue);
return new WPos(ret.X, ret.Y, clampedOffset);
}

View File

@@ -374,7 +374,7 @@ namespace OpenRA
public void RemoveAll(Predicate<IEffect> predicate)
{
effects.RemoveAll(predicate);
unpartitionedEffects.RemoveAll(e => predicate((IEffect)e));
unpartitionedEffects.RemoveAll(e => predicate(e));
syncedEffects.RemoveAll(e => predicate((IEffect)e));
}