mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Remove bad usage of Lazy<> from RobustMappedStringSerializer.
This commit is contained in:
@@ -52,9 +52,9 @@ namespace Robust.Shared.Serialization
|
||||
|
||||
private INetManager? _net;
|
||||
|
||||
private readonly Lazy<ISawmill> _lazyLogSzr = new Lazy<ISawmill>(() => Logger.GetSawmill("szr"));
|
||||
|
||||
private ISawmill LogSzr => _lazyLogSzr.Value;
|
||||
// I don't want to create 50 line changes in this commit so...
|
||||
// ReSharper disable once InconsistentNaming
|
||||
private ISawmill LogSzr = default!;
|
||||
|
||||
private readonly HashSet<INetChannel> _incompleteHandshakes = new HashSet<INetChannel>();
|
||||
|
||||
@@ -1306,6 +1306,10 @@ namespace Robust.Shared.Serialization
|
||||
/// </summary>
|
||||
public event Action? ClientHandshakeComplete;
|
||||
|
||||
public void InitLogging()
|
||||
{
|
||||
LogSzr = Logger.GetSawmill("szr");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -75,6 +75,8 @@ namespace Robust.Shared.Serialization
|
||||
}
|
||||
#endif
|
||||
|
||||
_mappedStringSerializer.InitLogging();
|
||||
|
||||
var settings = new Settings
|
||||
{
|
||||
CustomTypeSerializers = new ITypeSerializer[] {_mappedStringSerializer}
|
||||
|
||||
Reference in New Issue
Block a user