From 852d7ef48de64996af8fa109c8b4e8aedc0c5ec5 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Tue, 29 May 2018 00:07:33 -0300 Subject: [PATCH] Use ?: expression instead of if/else. --- osu.Game/Screens/Multi/Components/BeatmapTitle.cs | 1 - osu.Game/Screens/Multi/Components/BeatmapTypeInfo.cs | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/osu.Game/Screens/Multi/Components/BeatmapTitle.cs b/osu.Game/Screens/Multi/Components/BeatmapTitle.cs index a6cc472335..daa362409a 100644 --- a/osu.Game/Screens/Multi/Components/BeatmapTitle.cs +++ b/osu.Game/Screens/Multi/Components/BeatmapTitle.cs @@ -24,7 +24,6 @@ public float TextSize private BeatmapInfo beatmap; public BeatmapInfo Beatmap { - get { return beatmap; } set { if (value == beatmap) return; diff --git a/osu.Game/Screens/Multi/Components/BeatmapTypeInfo.cs b/osu.Game/Screens/Multi/Components/BeatmapTypeInfo.cs index 753006c62d..78ffe01ef0 100644 --- a/osu.Game/Screens/Multi/Components/BeatmapTypeInfo.cs +++ b/osu.Game/Screens/Multi/Components/BeatmapTypeInfo.cs @@ -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}"; } }