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.
|
||||
dotnet_style_require_accessibility_modifiers = omit_if_default:warning
|
||||
|
||||
# Simplify name.
|
||||
dotnet_diagnostic.IDE0001.severity = warning
|
||||
|
||||
# use 'var' instead of explicit type
|
||||
dotnet_diagnostic.IDE0007.severity = warning
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace OpenRA
|
||||
IReadOnlyPackage mapPackage = null;
|
||||
try
|
||||
{
|
||||
using (new Support.PerfTimer(map))
|
||||
using (new PerfTimer(map))
|
||||
{
|
||||
mapPackage = package.OpenPackage(map, modData.ModFiles);
|
||||
if (mapPackage != null)
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace OpenRA.Traits
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Type tag for DamageTypes <see cref="Primitives.BitSet{T}"/>.
|
||||
/// Type tag for DamageTypes <see cref="BitSet{T}"/>.
|
||||
/// </summary>
|
||||
public sealed class DamageType { DamageType() { } }
|
||||
|
||||
@@ -483,7 +483,7 @@ namespace OpenRA.Traits
|
||||
}
|
||||
|
||||
/// <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>
|
||||
public sealed class TargetableType { TargetableType() { } }
|
||||
|
||||
|
||||
@@ -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>((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);
|
||||
}
|
||||
|
||||
@@ -516,12 +516,12 @@ namespace OpenRA
|
||||
|
||||
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)
|
||||
{
|
||||
TraitDict.ApplyToActorsWithTrait<T>(action);
|
||||
TraitDict.ApplyToActorsWithTrait(action);
|
||||
}
|
||||
|
||||
public IEnumerable<Actor> ActorsHavingTrait<T>()
|
||||
|
||||
Reference in New Issue
Block a user