From 3487dfe23672edd67e016e7c5f9273d7be65fa67 Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Mon, 27 Feb 2017 17:32:32 +0300 Subject: [PATCH] Removed unused variables and parameters --- osu.Desktop.VisualTests/Benchmark.cs | 2 +- osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs | 2 +- osu.Game/Database/BeatmapDatabase.cs | 4 +--- osu.Game/Graphics/Cursor/OsuCursorContainer.cs | 2 +- osu.Game/Graphics/UserInterface/StarCounter.cs | 2 -- osu.Game/Overlays/ChatOverlay.cs | 4 +--- osu.Game/Overlays/MusicController.cs | 3 +-- osu.Game/Overlays/NotificationManager.cs | 2 +- osu.Game/Overlays/Notifications/Notification.cs | 2 +- osu.Game/Overlays/Pause/QuitButton.cs | 2 +- osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs | 2 +- osu.Game/Screens/Menu/ButtonSystem.cs | 2 +- 12 files changed, 11 insertions(+), 18 deletions(-) diff --git a/osu.Desktop.VisualTests/Benchmark.cs b/osu.Desktop.VisualTests/Benchmark.cs index 8c8cffaf3f..3847b6f00f 100644 --- a/osu.Desktop.VisualTests/Benchmark.cs +++ b/osu.Desktop.VisualTests/Benchmark.cs @@ -13,7 +13,7 @@ namespace osu.Desktop.VisualTests private double timePerTest = 200; [BackgroundDependencyLoader] - private void load(Framework.Game game) + private void load() { Host.MaximumDrawHz = int.MaxValue; Host.MaximumUpdateHz = int.MaxValue; diff --git a/osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs b/osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs index 39f45273a9..5af2e7c197 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs +++ b/osu.Game/Beatmaps/Drawables/BeatmapBackgroundSprite.cs @@ -16,7 +16,7 @@ namespace osu.Game.Beatmaps.Drawables } [BackgroundDependencyLoader] - private void load(OsuGameBase game) + private void load() { if (working.Background != null) Texture = working.Background; diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index ff58031c57..310575de9e 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -25,14 +25,12 @@ namespace osu.Game.Database public event Action BeatmapSetAdded; public event Action BeatmapSetRemoved; - private BeatmapImporter ipc; - public BeatmapDatabase(Storage storage, GameHost importHost = null) { this.storage = storage; if (importHost != null) - ipc = new BeatmapImporter(importHost, this); + new BeatmapImporter(importHost, this); if (connection == null) { diff --git a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs index 8011359db9..73626e03db 100644 --- a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs @@ -52,7 +52,7 @@ namespace osu.Game.Graphics.Cursor } [BackgroundDependencyLoader] - private void load(TextureStore textures, OsuConfigManager config) + private void load(OsuConfigManager config) { cursorScale = (BindableDouble)config.GetBindable(OsuConfig.CursorSize); diff --git a/osu.Game/Graphics/UserInterface/StarCounter.cs b/osu.Game/Graphics/UserInterface/StarCounter.cs index d2ca2e72f7..b9d1dca65d 100644 --- a/osu.Game/Graphics/UserInterface/StarCounter.cs +++ b/osu.Game/Graphics/UserInterface/StarCounter.cs @@ -14,8 +14,6 @@ namespace osu.Game.Graphics.UserInterface { private readonly Container stars; - private double transformStartTime; - /// /// Maximum amount of stars displayed. /// diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index c3138cb571..ab5a255897 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -29,8 +29,6 @@ namespace osu.Game.Overlays { const float textbox_height = 40; - private DrawableChannel channelDisplay; - private ScheduledDelegate messageRequest; private Container content; @@ -126,7 +124,7 @@ namespace osu.Game.Overlays private void addChannel(Channel channel) { - Add(channelDisplay = new DrawableChannel(channel)); + Add(new DrawableChannel(channel)); careChannels.Add(channel); } diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 661cbe06a4..430654b8f5 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -75,8 +75,7 @@ namespace osu.Game.Overlays } [BackgroundDependencyLoader] - private void load(OsuGameBase osuGame, OsuConfigManager config, BeatmapDatabase beatmaps, AudioManager audio, - TextureStore textures, OsuColour colours) + private void load(OsuGameBase osuGame, OsuConfigManager config, BeatmapDatabase beatmaps, OsuColour colours) { game = osuGame; diff --git a/osu.Game/Overlays/NotificationManager.cs b/osu.Game/Overlays/NotificationManager.cs index 7172559a94..77198a7fbe 100644 --- a/osu.Game/Overlays/NotificationManager.cs +++ b/osu.Game/Overlays/NotificationManager.cs @@ -25,7 +25,7 @@ namespace osu.Game.Overlays private FlowContainer sections; [BackgroundDependencyLoader(permitNulls: true)] - private void load(OsuColour colours) + private void load() { Width = width; RelativeSizeAxes = Axes.Y; diff --git a/osu.Game/Overlays/Notifications/Notification.cs b/osu.Game/Overlays/Notifications/Notification.cs index e3a1e55868..179e9bf066 100644 --- a/osu.Game/Overlays/Notifications/Notification.cs +++ b/osu.Game/Overlays/Notifications/Notification.cs @@ -256,7 +256,7 @@ namespace osu.Game.Overlays.Notifications } [BackgroundDependencyLoader] - private void load(OsuColour colours) + private void load() { Size = new Vector2(6, 15); diff --git a/osu.Game/Overlays/Pause/QuitButton.cs b/osu.Game/Overlays/Pause/QuitButton.cs index f1a9fd5e1d..dc99669111 100644 --- a/osu.Game/Overlays/Pause/QuitButton.cs +++ b/osu.Game/Overlays/Pause/QuitButton.cs @@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Pause public class QuitButton : PauseButton { [BackgroundDependencyLoader] - private void load(AudioManager audio, OsuColour colours) + private void load(AudioManager audio) { ButtonColour = new Color4(170, 27, 39, 255); // The red from the design isn't in the palette so it's used directly SampleHover = audio.Sample.Get(@"Menu/menuclick"); diff --git a/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs b/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs index 005efb77a2..f411f74361 100644 --- a/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs @@ -9,7 +9,7 @@ namespace osu.Game.Screens.Backgrounds public class BackgroundScreenDefault : BackgroundScreen { [BackgroundDependencyLoader] - private void load(Framework.Game game) + private void load() { Add(new Background(@"Backgrounds/bg1")); } diff --git a/osu.Game/Screens/Menu/ButtonSystem.cs b/osu.Game/Screens/Menu/ButtonSystem.cs index dad7490c69..c4d1abd931 100644 --- a/osu.Game/Screens/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -117,7 +117,7 @@ namespace osu.Game.Screens.Menu } [BackgroundDependencyLoader(true)] - private void load(AudioManager audio, OsuGame game = null) + private void load(OsuGame game = null) { toolbar = game?.Toolbar; }