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 @@ namespace osu.Game.Screens.Multi.Components
private BeatmapInfo beatmap; private BeatmapInfo beatmap;
public BeatmapInfo Beatmap public BeatmapInfo Beatmap
{ {
get { return beatmap; }
set set
{ {
if (value == beatmap) return; if (value == beatmap) return;

View File

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