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

@@ -37,16 +37,16 @@ namespace Content.Server.GameObjects.EntitySystems.Atmos
/// <summary>
/// The tiles that have had their atmos data updated since last tick
/// </summary>
private readonly Dictionary<GridId, HashSet<Vector2i>> _invalidTiles = new Dictionary<GridId, HashSet<Vector2i>>();
private readonly Dictionary<GridId, HashSet<Vector2i>> _invalidTiles = new();
private readonly Dictionary<IPlayerSession, PlayerGasOverlay> _knownPlayerChunks =
new Dictionary<IPlayerSession, PlayerGasOverlay>();
new();
/// <summary>
/// Gas data stored in chunks to make PVS / bubbling easier.
/// </summary>
private readonly Dictionary<GridId, Dictionary<Vector2i, GasOverlayChunk>> _overlay =
new Dictionary<GridId, Dictionary<Vector2i, GasOverlayChunk>>();
new();
/// <summary>
/// How far away do we update gas overlays (minimum; due to chunking further away tiles may also be updated).
@@ -378,14 +378,14 @@ namespace Content.Server.GameObjects.EntitySystems.Atmos
private sealed class PlayerGasOverlay
{
private readonly Dictionary<GridId, Dictionary<Vector2i, GasOverlayChunk>> _data =
new Dictionary<GridId, Dictionary<Vector2i, GasOverlayChunk>>();
new();
private readonly Dictionary<GasOverlayChunk, GameTick> _lastSent =
new Dictionary<GasOverlayChunk, GameTick>();
new();
public GasOverlayMessage UpdateClient(GridId grid, List<(Vector2i, GasOverlayData)> data)
{
return new GasOverlayMessage(grid, data);
return new(grid, data);
}
public void Reset()