Fix a few regressions.

This commit is contained in:
Dean Herbert 2017-03-07 13:30:36 +09:00
parent 0199181cce
commit 1751532a01
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
3 changed files with 4 additions and 3 deletions

View File

@ -91,7 +91,8 @@ public void TestImportWhenFileOpen()
Assert.IsTrue(File.Exists(temp));
osu.Dependencies.Get<BeatmapDatabase>().Import(temp);
using (File.OpenRead(temp))
osu.Dependencies.Get<BeatmapDatabase>().Import(temp);
ensureLoaded(osu);

View File

@ -68,7 +68,7 @@ public void BlurTo(Vector2 sigma, double duration, EasingTypes easing = EasingTy
public override bool Equals(BackgroundScreen other)
{
var otherBeatmapBackground = (BackgroundScreenBeatmap)other;
var otherBeatmapBackground = other as BackgroundScreenBeatmap;
if (otherBeatmapBackground == null) return false;
return base.Equals(other) && beatmap == otherBeatmapBackground.Beatmap;

View File

@ -17,7 +17,7 @@ public BackgroundScreenCustom(string textureName)
public override bool Equals(BackgroundScreen other)
{
var backgroundScreenCustom = (BackgroundScreenCustom)other;
var backgroundScreenCustom = other as BackgroundScreenCustom;
if (backgroundScreenCustom == null) return false;
return base.Equals(other) && textureName == backgroundScreenCustom.textureName;