Use 'new' expression in places where the type is evident for content (#2590)

* Content.Client

* Content.Benchmarks

* Content.IntegrationTests

* Content.Server

* Content.Server.Database

* Content.Shared

* Content.Tests

* Merge fixes

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
DrSmugleaf
2020-11-27 11:00:49 +01:00
committed by GitHub
parent 4a56df749b
commit 5c0cf1b1a0
235 changed files with 431 additions and 433 deletions

View File

@@ -22,17 +22,17 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
/// Whenever there's a change in the collision layers we update the mask as the graph has more reads than writes
/// </summary>
public int BlockedCollisionMask { get; private set; }
private readonly Dictionary<IEntity, int> _blockedCollidables = new Dictionary<IEntity, int>(0);
private readonly Dictionary<IEntity, int> _blockedCollidables = new(0);
public IReadOnlyDictionary<IEntity, int> PhysicsLayers => _physicsLayers;
private readonly Dictionary<IEntity, int> _physicsLayers = new Dictionary<IEntity, int>(0);
private readonly Dictionary<IEntity, int> _physicsLayers = new(0);
/// <summary>
/// The entities on this tile that require access to traverse
/// </summary>
/// We don't store the ICollection, at least for now, as we'd need to replicate the access code here
public IReadOnlyCollection<AccessReader> AccessReaders => _accessReaders.Values;
private readonly Dictionary<IEntity, AccessReader> _accessReaders = new Dictionary<IEntity, AccessReader>(0);
private readonly Dictionary<IEntity, AccessReader> _accessReaders = new(0);
public PathfindingNode(PathfindingChunk parent, TileRef tileRef)
{