Fix IDE0062
This commit is contained in:
committed by
Pavel Penev
parent
023d80b94d
commit
cbd0583289
@@ -63,7 +63,7 @@ dotnet_diagnostic.IDE0044.severity = warning
|
||||
|
||||
# IDE0062 Make local function static
|
||||
#csharp_prefer_static_local_function = true
|
||||
dotnet_diagnostic.IDE0062.severity = silent # Requires C# 8 - TODO Consider enabling
|
||||
dotnet_diagnostic.IDE0062.severity = warning
|
||||
|
||||
# IDE0064 Make struct fields writable
|
||||
# No options
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace OpenRA
|
||||
var unresolved = source.ToHashSet();
|
||||
unresolved.ExceptWith(resolved);
|
||||
|
||||
bool AreResolvable(Type a, Type b) => a.IsAssignableFrom(b);
|
||||
static bool AreResolvable(Type a, Type b) => a.IsAssignableFrom(b);
|
||||
|
||||
// This query detects which unresolved traits can be immediately resolved as all their direct dependencies are met.
|
||||
var more = unresolved.Where(u =>
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
public void LoadPalettes(WorldRenderer wr)
|
||||
{
|
||||
uint MakeColor(int i)
|
||||
static uint MakeColor(int i)
|
||||
{
|
||||
if (i < 128)
|
||||
return (uint)(int2.Lerp(255, 0, i, 127) << 24);
|
||||
|
||||
@@ -307,7 +307,7 @@ namespace OpenRA.Mods.Common.Pathfinder
|
||||
/// </summary>
|
||||
void BuildGrids()
|
||||
{
|
||||
Grid GetCPosBounds(Map map)
|
||||
static Grid GetCPosBounds(Map map)
|
||||
{
|
||||
if (map.Grid.Type == MapGridType.RectangularIsometric)
|
||||
{
|
||||
@@ -369,7 +369,7 @@ namespace OpenRA.Mods.Common.Pathfinder
|
||||
}
|
||||
}
|
||||
|
||||
CPos AbstractCellForLocalCells(List<CPos> cells, byte layer)
|
||||
static CPos AbstractCellForLocalCells(List<CPos> cells, byte layer)
|
||||
{
|
||||
var minX = int.MaxValue;
|
||||
var minY = int.MaxValue;
|
||||
|
||||
@@ -692,7 +692,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
header.Get<LabelWidget>("LABEL").GetText = () => headerTitle;
|
||||
rows.Add(header);
|
||||
|
||||
int ListOrder(GameServer g)
|
||||
static int ListOrder(GameServer g)
|
||||
{
|
||||
// Servers waiting for players are always first
|
||||
if (g.State == (int)ServerState.WaitingPlayers && g.Players > 0)
|
||||
|
||||
Reference in New Issue
Block a user