Fix IDE0029
This commit is contained in:
committed by
Pavel Penev
parent
67ba3e55de
commit
8223161959
@@ -153,6 +153,9 @@ dotnet_diagnostic.IDE0020.severity = warning
|
||||
# Collection initialization can be simplified
|
||||
dotnet_diagnostic.IDE0028.severity = warning
|
||||
|
||||
# Use coalesce expression (non-nullable types).
|
||||
dotnet_diagnostic.IDE0029.severity = warning
|
||||
|
||||
# Simplify 'default' expression
|
||||
dotnet_diagnostic.IDE0034.severity = warning
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace OpenRA.Mods.Common.Terrain
|
||||
}
|
||||
|
||||
var frameCount = terrainInfo.EnableDepth && depthFrames == null ? allFrames.Length / 2 : allFrames.Length;
|
||||
var indices = templateInfo.Frames != null ? templateInfo.Frames : Exts.MakeArray(t.Value.TilesCount, j => j);
|
||||
var indices = templateInfo.Frames ?? Exts.MakeArray(t.Value.TilesCount, j => j);
|
||||
|
||||
var start = indices.Min();
|
||||
var end = indices.Max();
|
||||
|
||||
@@ -591,7 +591,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
var traits = productionTraits.Where(p => !p.IsTraitDisabled && p.Info.Produces.Contains(Info.Type));
|
||||
var unpaused = traits.FirstOrDefault(a => !a.IsTraitPaused);
|
||||
return new TraitPair<Production>(self, unpaused != null ? unpaused : traits.FirstOrDefault());
|
||||
return new TraitPair<Production>(self, unpaused ?? traits.FirstOrDefault());
|
||||
}
|
||||
|
||||
// Builds a unit from the actor that holds this queue (1 queue per building)
|
||||
|
||||
Reference in New Issue
Block a user