Use ?: expression instead of if/else.

This commit is contained in:
DrabWeb 2018-05-29 00:07:33 -03:00
parent 7beac3a712
commit 852d7ef48d
2 changed files with 1 additions and 6 deletions

View File

@ -24,7 +24,6 @@ public float TextSize
private BeatmapInfo beatmap;
public BeatmapInfo Beatmap
{
get { return beatmap; }
set
{
if (value == beatmap) return;

View File

@ -23,11 +23,7 @@ public BeatmapInfo Beatmap
set
{
modeTypeInfo.Beatmap = beatmapTitle.Beatmap = value;
if (value == null)
beatmapAuthor.Text = string.Empty;
else
beatmapAuthor.Text = $"mapped by {value.Metadata.Author}";
beatmapAuthor.Text = value == null ? string.Empty : $"mapped by {value.Metadata.Author}";
}
}