Replace terniary null checks with coalescing.

This commit is contained in:
Paul Chote
2021-03-07 21:22:00 +00:00
committed by teinarss
parent 2473b8763b
commit d52ba83f96
43 changed files with 72 additions and 73 deletions

View File

@@ -48,7 +48,7 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("Return or set the time limit (in ticks). When setting, the time limit will count from now. Setting the time limit to 0 will disable it.")]
public int TimeLimit
{
get => tlm != null ? tlm.TimeLimit : 0;
get => tlm?.TimeLimit ?? 0;
set
{
@@ -62,7 +62,7 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("The notification string used for custom time limit warnings. See the TimeLimitManager trait documentation for details.")]
public string TimeLimitNotification
{
get => tlm != null ? tlm.Notification : null;
get => tlm?.Notification;
set
{