mirror of https://github.com/ppy/osu
Use ?: expression instead of if/else.
This commit is contained in:
parent
7beac3a712
commit
852d7ef48d
|
@ -24,7 +24,6 @@ public float TextSize
|
|||
private BeatmapInfo beatmap;
|
||||
public BeatmapInfo Beatmap
|
||||
{
|
||||
get { return beatmap; }
|
||||
set
|
||||
{
|
||||
if (value == beatmap) return;
|
||||
|
|
|
@ -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}";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue