From 1b5c4a7c5abd6f3981006e40609078068b16daf7 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Thu, 11 Oct 2018 21:03:29 -0500 Subject: [PATCH] Fixed some warnings --- IPA.Injector/LibLoader.cs | 10 +++++----- IPA.Loader/Loader/PluginComponent.cs | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/IPA.Injector/LibLoader.cs b/IPA.Injector/LibLoader.cs index 50dd12be..34a378ae 100644 --- a/IPA.Injector/LibLoader.cs +++ b/IPA.Injector/LibLoader.cs @@ -96,12 +96,12 @@ namespace IPA.Injector // choice of which exceptions to catch depends entirely on the specific task // you are intending to perform and also on how much you know with certainty // about the systems on which this code will run. - catch (UnauthorizedAccessException e) + catch (UnauthorizedAccessException) { //Console.WriteLine(e.Message); continue; } - catch (System.IO.DirectoryNotFoundException e) + catch (System.IO.DirectoryNotFoundException) { //Console.WriteLine(e.Message); continue; @@ -113,14 +113,14 @@ namespace IPA.Injector files = System.IO.Directory.GetFiles(currentDir); } - catch (UnauthorizedAccessException e) + catch (UnauthorizedAccessException) { //Console.WriteLine(e.Message); continue; } - catch (System.IO.DirectoryNotFoundException e) + catch (System.IO.DirectoryNotFoundException) { //Console.WriteLine(e.Message); continue; @@ -142,7 +142,7 @@ namespace IPA.Injector nextValue = new System.IO.FileInfo(file); //Console.WriteLine("{0}: {1}, {2}", fi.Name, fi.Length, fi.CreationTime); } - catch (System.IO.FileNotFoundException e) + catch (System.IO.FileNotFoundException) { // If file was deleted by a separate application // or thread since the call to TraverseTree() diff --git a/IPA.Loader/Loader/PluginComponent.cs b/IPA.Loader/Loader/PluginComponent.cs index 9deee95a..f4915662 100644 --- a/IPA.Loader/Loader/PluginComponent.cs +++ b/IPA.Loader/Loader/PluginComponent.cs @@ -25,8 +25,10 @@ namespace IPA.Loader DontDestroyOnLoad(gameObject); bsPlugins = new CompositeBSPlugin(PluginManager.BSPlugins); +#pragma warning disable CS0618 // Type or member is obsolete ipaPlugins = new CompositeIPAPlugin(PluginManager.Plugins); - +#pragma warning restore CS0618 // Type or member is obsolete + gameObject.AddComponent(); bsPlugins.OnApplicationStart();