From 62665649bdec8b1b45b04e2d48bc68da689124d4 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 23 May 2022 12:19:06 -0400 Subject: shortcut common cases in hot code paths --- src/SMAPI/Framework/Deprecations/DeprecationManager.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/SMAPI/Framework/Deprecations') diff --git a/src/SMAPI/Framework/Deprecations/DeprecationManager.cs b/src/SMAPI/Framework/Deprecations/DeprecationManager.cs index 3bbbd7b8..4597a764 100644 --- a/src/SMAPI/Framework/Deprecations/DeprecationManager.cs +++ b/src/SMAPI/Framework/Deprecations/DeprecationManager.cs @@ -95,6 +95,9 @@ namespace StardewModdingAPI.Framework.Deprecations /// Print any queued messages. public void PrintQueued() { + if (!this.QueuedWarnings.Any()) + return; + foreach (DeprecationWarning warning in this.QueuedWarnings.OrderBy(p => p.ModName).ThenBy(p => p.NounPhrase)) { // build message -- cgit