summaryrefslogtreecommitdiff
path: root/src/SMAPI.Internal.Patching
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-06 18:24:59 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-06 18:24:59 -0400
commita593eda30f82af474887d91458b0e9158f66fefc (patch)
tree8aa0e0586e3cce7627e8c4ff445a953665953f8f /src/SMAPI.Internal.Patching
parent29f909a8d5dbb83d6df1a54d2680e6f9898f3b19 (diff)
downloadSMAPI-a593eda30f82af474887d91458b0e9158f66fefc.tar.gz
SMAPI-a593eda30f82af474887d91458b0e9158f66fefc.tar.bz2
SMAPI-a593eda30f82af474887d91458b0e9158f66fefc.zip
use target-typed new
Diffstat (limited to 'src/SMAPI.Internal.Patching')
-rw-r--r--src/SMAPI.Internal.Patching/HarmonyPatcher.cs2
-rw-r--r--src/SMAPI.Internal.Patching/PatchHelper.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/SMAPI.Internal.Patching/HarmonyPatcher.cs b/src/SMAPI.Internal.Patching/HarmonyPatcher.cs
index c07e3b41..6f30c241 100644
--- a/src/SMAPI.Internal.Patching/HarmonyPatcher.cs
+++ b/src/SMAPI.Internal.Patching/HarmonyPatcher.cs
@@ -15,7 +15,7 @@ namespace StardewModdingAPI.Internal.Patching
/// <param name="patchers">The patchers to apply.</param>
public static Harmony Apply(string id, IMonitor monitor, params IPatcher[] patchers)
{
- Harmony harmony = new Harmony(id);
+ Harmony harmony = new(id);
foreach (IPatcher patcher in patchers)
{
diff --git a/src/SMAPI.Internal.Patching/PatchHelper.cs b/src/SMAPI.Internal.Patching/PatchHelper.cs
index fc79ddf2..c9758616 100644
--- a/src/SMAPI.Internal.Patching/PatchHelper.cs
+++ b/src/SMAPI.Internal.Patching/PatchHelper.cs
@@ -43,7 +43,7 @@ namespace StardewModdingAPI.Internal.Patching
/// <param name="generics">The method generic types, or <c>null</c> if it's not generic.</param>
public static string GetMethodString(Type type, string name, Type[] parameters = null, Type[] generics = null)
{
- StringBuilder str = new StringBuilder();
+ StringBuilder str = new();
// type
str.Append(type.FullName);