Fix IDE0001
This commit is contained in:
committed by
Pavel Penev
parent
ee35cbc0d0
commit
8b4500146f
@@ -126,6 +126,9 @@ dotnet_style_predefined_type_for_locals_parameters_members = true
|
|||||||
# Show an IDE warning when default access modifiers are explicitly specified.
|
# Show an IDE warning when default access modifiers are explicitly specified.
|
||||||
dotnet_style_require_accessibility_modifiers = omit_if_default:warning
|
dotnet_style_require_accessibility_modifiers = omit_if_default:warning
|
||||||
|
|
||||||
|
# Simplify name.
|
||||||
|
dotnet_diagnostic.IDE0001.severity = warning
|
||||||
|
|
||||||
# use 'var' instead of explicit type
|
# use 'var' instead of explicit type
|
||||||
dotnet_diagnostic.IDE0007.severity = warning
|
dotnet_diagnostic.IDE0007.severity = warning
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ namespace OpenRA
|
|||||||
IReadOnlyPackage mapPackage = null;
|
IReadOnlyPackage mapPackage = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (new Support.PerfTimer(map))
|
using (new PerfTimer(map))
|
||||||
{
|
{
|
||||||
mapPackage = package.OpenPackage(map, modData.ModFiles);
|
mapPackage = package.OpenPackage(map, modData.ModFiles);
|
||||||
if (mapPackage != null)
|
if (mapPackage != null)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace OpenRA.Traits
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Type tag for DamageTypes <see cref="Primitives.BitSet{T}"/>.
|
/// Type tag for DamageTypes <see cref="BitSet{T}"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class DamageType { DamageType() { } }
|
public sealed class DamageType { DamageType() { } }
|
||||||
|
|
||||||
@@ -483,7 +483,7 @@ namespace OpenRA.Traits
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates target types as defined on <see cref="Traits.ITargetable"/> are present in a <see cref="Primitives.BitSet{T}"/>.
|
/// Indicates target types as defined on <see cref="ITargetable"/> are present in a <see cref="BitSet{T}"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class TargetableType { TargetableType() { } }
|
public sealed class TargetableType { TargetableType() { } }
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ namespace OpenRA
|
|||||||
// Add an additional quadratic variation to height
|
// Add an additional quadratic variation to height
|
||||||
// Uses decimal to avoid integer overflow
|
// Uses decimal to avoid integer overflow
|
||||||
var offset = (decimal)(b - a).Length * pitch.Tan() * mul * (div - mul) / (1024 * div * div);
|
var offset = (decimal)(b - a).Length * pitch.Tan() * mul * (div - mul) / (1024 * div * div);
|
||||||
var clampedOffset = (int)(offset + (decimal)ret.Z).Clamp<decimal>((decimal)int.MinValue, (decimal)int.MaxValue);
|
var clampedOffset = (int)(offset + (decimal)ret.Z).Clamp((decimal)int.MinValue, (decimal)int.MaxValue);
|
||||||
|
|
||||||
return new WPos(ret.X, ret.Y, clampedOffset);
|
return new WPos(ret.X, ret.Y, clampedOffset);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -516,12 +516,12 @@ namespace OpenRA
|
|||||||
|
|
||||||
public void ApplyToActorsWithTraitTimed<T>(Action<Actor, T> action, string text)
|
public void ApplyToActorsWithTraitTimed<T>(Action<Actor, T> action, string text)
|
||||||
{
|
{
|
||||||
TraitDict.ApplyToActorsWithTraitTimed<T>(action, text);
|
TraitDict.ApplyToActorsWithTraitTimed(action, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ApplyToActorsWithTrait<T>(Action<Actor, T> action)
|
public void ApplyToActorsWithTrait<T>(Action<Actor, T> action)
|
||||||
{
|
{
|
||||||
TraitDict.ApplyToActorsWithTrait<T>(action);
|
TraitDict.ApplyToActorsWithTrait(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<Actor> ActorsHavingTrait<T>()
|
public IEnumerable<Actor> ActorsHavingTrait<T>()
|
||||||
|
|||||||
Reference in New Issue
Block a user