1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 15:43:22 +08:00

Remove unnecessary arguments in WorkingBeatmap's constructor.

This commit is contained in:
Huo Yaoyuan 2017-05-08 16:42:53 +08:00
parent f37c857af8
commit 4c26a02e99
3 changed files with 6 additions and 6 deletions

View File

@ -24,11 +24,11 @@ namespace osu.Game.Beatmaps
public readonly bool WithStoryboard;
protected WorkingBeatmap(BeatmapInfo beatmapInfo, BeatmapSetInfo beatmapSetInfo = null, BeatmapMetadata metadata = null, bool withStoryboard = false)
protected WorkingBeatmap(BeatmapInfo beatmapInfo, bool withStoryboard = false)
{
BeatmapInfo = beatmapInfo;
BeatmapSetInfo = beatmapSetInfo ?? beatmapInfo?.BeatmapSet;
Metadata = metadata ?? beatmapInfo?.Metadata ?? BeatmapSetInfo?.Metadata;
BeatmapSetInfo = beatmapInfo.BeatmapSet;
Metadata = beatmapInfo.Metadata ?? BeatmapSetInfo.Metadata;
WithStoryboard = withStoryboard;
Mods.ValueChanged += mods => applyRateAdjustments();

View File

@ -273,7 +273,7 @@ namespace osu.Game.Database
if (beatmapInfo.Metadata == null)
beatmapInfo.Metadata = beatmapInfo.BeatmapSet.Metadata;
WorkingBeatmap working = new DatabaseWorkingBeatmap(this, beatmapInfo, withStoryboard: withStoryboard);
WorkingBeatmap working = new DatabaseWorkingBeatmap(this, beatmapInfo, withStoryboard);
previous?.TransferTo(working);

View File

@ -14,8 +14,8 @@ namespace osu.Game.Database
{
private readonly BeatmapDatabase database;
public DatabaseWorkingBeatmap(BeatmapDatabase database, BeatmapInfo beatmapInfo, BeatmapSetInfo beatmapSetInfo = null, BeatmapMetadata metadata = null, bool withStoryboard = false)
: base(beatmapInfo, beatmapSetInfo, metadata, withStoryboard)
public DatabaseWorkingBeatmap(BeatmapDatabase database, BeatmapInfo beatmapInfo, bool withStoryboard = false)
: base(beatmapInfo, withStoryboard)
{
this.database = database;
}