summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Deprecations
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-23 12:19:06 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-23 12:19:06 -0400
commit62665649bdec8b1b45b04e2d48bc68da689124d4 (patch)
tree6334509873f0af1770279db5993dc54d267138c5 /src/SMAPI/Framework/Deprecations
parent2ab2182645179129997eac3fccb63f6f0683dbe1 (diff)
downloadSMAPI-62665649bdec8b1b45b04e2d48bc68da689124d4.tar.gz
SMAPI-62665649bdec8b1b45b04e2d48bc68da689124d4.tar.bz2
SMAPI-62665649bdec8b1b45b04e2d48bc68da689124d4.zip
shortcut common cases in hot code paths
Diffstat (limited to 'src/SMAPI/Framework/Deprecations')
-rw-r--r--src/SMAPI/Framework/Deprecations/DeprecationManager.cs3
1 files changed, 3 insertions, 0 deletions
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
/// <summary>Print any queued messages.</summary>
public void PrintQueued()
{
+ if (!this.QueuedWarnings.Any())
+ return;
+
foreach (DeprecationWarning warning in this.QueuedWarnings.OrderBy(p => p.ModName).ThenBy(p => p.NounPhrase))
{
// build message