From 048f41244f6b2c7f95ac5bf75be2b16f42b99169 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 15 May 2022 01:54:01 -0400 Subject: reduce performance impact of deprecation warnings Creating a stack is *very* slow, so it should be avoided if possible until after the duplicate-warning check. --- src/SMAPI/Utilities/PerScreen.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SMAPI/Utilities') diff --git a/src/SMAPI/Utilities/PerScreen.cs b/src/SMAPI/Utilities/PerScreen.cs index 1c4c56fe..b86310b8 100644 --- a/src/SMAPI/Utilities/PerScreen.cs +++ b/src/SMAPI/Utilities/PerScreen.cs @@ -97,7 +97,7 @@ namespace StardewModdingAPI.Utilities if (!nullExpected) { SCore.DeprecationManager.Warn( - SCore.DeprecationManager.GetModFromStack(), + null, $"calling the {nameof(PerScreen)} constructor with null", "3.14.0", DeprecationLevel.Notice -- cgit