Fixes implicit ternary expressions

This commit is contained in:
Kamron Batman 2018-09-14 14:56:48 -07:00
parent c85b0a740c
commit ff26dfa375
345 changed files with 1905 additions and 2336 deletions

View file

@ -12,8 +12,7 @@ namespace Server.Items
{
if ( m_Owner != null )
return $"{m_Owner}'s St. Valentine Bear";
else
return "St. Valentine Bear";
return "St. Valentine Bear";
}
}
@ -194,9 +193,10 @@ namespace Server.Items
from.SendMessage( "Lines cannot be left blank." );
return;
}
else if ( line1.Length > 25
|| line2.Length > 25
|| line3.Length > 25 )
if ( line1.Length > 25
|| line2.Length > 25
|| line3.Length > 25 )
{
from.SendMessage( "Lines may not exceed 25 characters." );
return;
@ -216,7 +216,7 @@ namespace Server.Items
{
TextRelay tr = info.GetTextEntry( idx );
return ( tr == null ) ? null : tr.Text;
return tr?.Text;
}
}
}