1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 08:23:00 +08:00

Merge pull request #1501 from smoogipoo/warning-fixes

Clean up a few warnings in preparation for net-standard
This commit is contained in:
Dean Herbert 2017-11-14 20:51:54 +09:00 committed by GitHub
commit 9abf0dd757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 12 additions and 1033 deletions

View File

@ -233,7 +233,8 @@ namespace osu.Desktop.Overlays
Text = @"Update ready to install. Click to restart!",
Activated = () =>
{
UpdateManager.RestartAppWhenExited();
// Squirrel returns execution to us after the update process is started, so it's safe to use Wait() here
UpdateManager.RestartAppWhenExited().Wait();
game.GracefullyExit();
return true;
}

View File

@ -341,6 +341,8 @@ namespace osu.Game.Beatmaps
/// Returns a <see cref="BeatmapSetInfo"/> to a usable state if it has previously been deleted but not yet purged.
/// Is a no-op for already usable beatmaps.
/// </summary>
/// <param name="beatmaps">The store to restore beatmaps from.</param>
/// <param name="files">The store to restore beatmap files from.</param>
/// <param name="beatmapSet">The beatmap to restore.</param>
private void undelete(BeatmapStore beatmaps, FileStore files, BeatmapSetInfo beatmapSet)
{
@ -426,6 +428,8 @@ namespace osu.Game.Beatmaps
/// Import a beamap into our local <see cref="FileStore"/> storage.
/// If the beatmap is already imported, the existing instance will be returned.
/// </summary>
/// <param name="files">The store to import beatmap files to.</param>
/// <param name="beatmaps">The store to import beatmaps to.</param>
/// <param name="reader">The beatmap archive to be read.</param>
/// <returns>The imported beatmap, or an existing instance if it is already present.</returns>
private BeatmapSetInfo importToStorage(FileStore files, BeatmapStore beatmaps, ArchiveReader reader)

View File

@ -102,7 +102,7 @@ namespace osu.Game.Database
return null;
}
public new int SaveChanges(IDbContextTransaction transaction = null)
public int SaveChanges(IDbContextTransaction transaction = null)
{
var ret = base.SaveChanges();
transaction?.Commit();
@ -262,7 +262,7 @@ namespace osu.Game.Database
throw new MigrationFailedException(e);
}
}
catch (MigrationFailedException e)
catch (MigrationFailedException)
{
throw;
}

View File

@ -19,7 +19,7 @@ namespace osu.Game.IO
{
public readonly IResourceStore<byte[]> Store;
public Storage Storage => base.Storage;
public new Storage Storage => base.Storage;
public FileStore(Func<OsuDbContext> createContext, Storage storage) : base(createContext, storage.GetStorageForDirectory(@"files"))
{

View File

@ -33,7 +33,7 @@ namespace osu.Game.Overlays.Settings
private SpriteText text;
private readonly RestoreDefaultValueButton<T> restoreDefaultValueButton = new RestoreDefaultValueButton<T>();
private readonly RestoreDefaultValueButton restoreDefaultValueButton = new RestoreDefaultValueButton();
public bool ShowsDefaultIndicator = true;
@ -132,7 +132,7 @@ namespace osu.Game.Overlays.Settings
}
}
private class RestoreDefaultValueButton<T> : Box, IHasTooltip
private class RestoreDefaultValueButton : Box, IHasTooltip
{
private Bindable<T> bindable;
internal Bindable<T> Bindable

View File

@ -1,20 +0,0 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.IO;
using System.Reflection;
namespace osu.Game.Tests.Resources
{
public static class Resource
{
public static Stream OpenResource(string name)
{
var localPath = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path));
return Assembly.GetExecutingAssembly().GetManifestResourceStream($@"osu.Game.Tests.Resources.{name}") ??
Assembly.LoadFrom(Path.Combine(localPath, @"osu.Game.Resources.dll")).GetManifestResourceStream($@"osu.Game.Resources.{name}");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -114,7 +114,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
}
/// <summary>
/// Zoom target as a relative position in the <see cref="Content"/> space.
/// Zoom target as a relative position in the <see cref="ScrollingTimelineContainer.Content"/> space.
/// </summary>
private float? relativeContentZoomTarget;

View File

@ -12,7 +12,6 @@ using osu.Framework.MathUtils;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.IO;
using osu.Game.Configuration;
using osu.Game.Graphics.Containers;
using osu.Game.Screens.Backgrounds;
using OpenTK;
using OpenTK.Graphics;
@ -21,8 +20,6 @@ namespace osu.Game.Screens.Menu
{
public class Intro : OsuScreen
{
private readonly IntroSequence introSequence;
private const string menu_music_beatmap_hash = "3c8b1fcc9434dbb29e2fb613d3b9eada9d7bb6c125ceb32396c3b53437280c83";
/// <summary>
@ -43,7 +40,6 @@ namespace osu.Game.Screens.Menu
private Bindable<bool> menuVoice;
private Bindable<bool> menuMusic;
private Track track;
private readonly ParallaxContainer parallax;
[BackgroundDependencyLoader]
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game)