From 67c9bb37fd8294a5f6229e856c00cfecf5335cd9 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Fri, 17 Mar 2017 14:51:09 +0900 Subject: [PATCH 1/3] Add license headers. --- osu.Game/Beatmaps/Legacy/IIsLegacy.cs | 5 ++++- osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/osu.Game/Beatmaps/Legacy/IIsLegacy.cs b/osu.Game/Beatmaps/Legacy/IIsLegacy.cs index 23ab9f4bc4..3babd3e66f 100644 --- a/osu.Game/Beatmaps/Legacy/IIsLegacy.cs +++ b/osu.Game/Beatmaps/Legacy/IIsLegacy.cs @@ -1,4 +1,7 @@ -namespace osu.Game.Beatmaps.Legacy +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Beatmaps.Legacy { /// /// A Beatmap that was loaded from a legacy .osu beatmap file (version <=15). diff --git a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs index 00aeeb2b49..d0386e7560 100644 --- a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs +++ b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs @@ -1,4 +1,7 @@ -namespace osu.Game.Beatmaps.Legacy +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Beatmaps.Legacy { /// /// A type of Beatmap loaded from a legacy .osu beatmap file (version <=15). From 74a1837a05f71d6a5f90bf681e4fd8b68b9fc535 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Fri, 17 Mar 2017 14:56:50 +0900 Subject: [PATCH 2/3] Fix nullref. --- osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs index d0386e7560..45c5665494 100644 --- a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs +++ b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs @@ -15,6 +15,7 @@ namespace osu.Game.Beatmaps.Legacy public LegacyBeatmap(Beatmap original = null) : base(original) { + HitObjects = original?.HitObjects ?? null; } } } From 26b0bb02d80dfb49ac00435d029f0693bd15aa75 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Sat, 18 Mar 2017 18:32:54 +0900 Subject: [PATCH 3/3] Remove IIsLegacy, expose LegacyBeatmap without a public constructor. --- osu.Game/Beatmaps/Legacy/IIsLegacy.cs | 12 ------------ osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs | 4 ++-- osu.Game/osu.Game.csproj | 1 - 3 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 osu.Game/Beatmaps/Legacy/IIsLegacy.cs diff --git a/osu.Game/Beatmaps/Legacy/IIsLegacy.cs b/osu.Game/Beatmaps/Legacy/IIsLegacy.cs deleted file mode 100644 index 3babd3e66f..0000000000 --- a/osu.Game/Beatmaps/Legacy/IIsLegacy.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -namespace osu.Game.Beatmaps.Legacy -{ - /// - /// A Beatmap that was loaded from a legacy .osu beatmap file (version <=15). - /// - public interface IIsLegacy - { - } -} diff --git a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs index 45c5665494..dd40af925a 100644 --- a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs +++ b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs @@ -6,13 +6,13 @@ namespace osu.Game.Beatmaps.Legacy /// /// A type of Beatmap loaded from a legacy .osu beatmap file (version <=15). /// - internal class LegacyBeatmap : Beatmap, IIsLegacy + public class LegacyBeatmap : Beatmap { /// /// Constructs a new beatmap. /// /// The original beatmap to use the parameters of. - public LegacyBeatmap(Beatmap original = null) + internal LegacyBeatmap(Beatmap original = null) : base(original) { HitObjects = original?.HitObjects ?? null; diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index c0f11dbcb9..1f14615b62 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -77,7 +77,6 @@ -