shortcut common cases in hot code paths
This commit is contained in:
parent
2ab2182645
commit
62665649bd
|
@ -95,6 +95,9 @@ namespace StardewModdingAPI.Framework.Deprecations
|
||||||
/// <summary>Print any queued messages.</summary>
|
/// <summary>Print any queued messages.</summary>
|
||||||
public void PrintQueued()
|
public void PrintQueued()
|
||||||
{
|
{
|
||||||
|
if (!this.QueuedWarnings.Any())
|
||||||
|
return;
|
||||||
|
|
||||||
foreach (DeprecationWarning warning in this.QueuedWarnings.OrderBy(p => p.ModName).ThenBy(p => p.NounPhrase))
|
foreach (DeprecationWarning warning in this.QueuedWarnings.OrderBy(p => p.ModName).ThenBy(p => p.NounPhrase))
|
||||||
{
|
{
|
||||||
// build message
|
// build message
|
||||||
|
|
|
@ -596,6 +596,7 @@ namespace StardewModdingAPI.Framework
|
||||||
/*********
|
/*********
|
||||||
** Execute commands
|
** Execute commands
|
||||||
*********/
|
*********/
|
||||||
|
if (this.ScreenCommandQueue.Value.Any())
|
||||||
{
|
{
|
||||||
var commandQueue = this.ScreenCommandQueue.Value;
|
var commandQueue = this.ScreenCommandQueue.Value;
|
||||||
foreach ((Command? command, string? name, string[]? args) in commandQueue)
|
foreach ((Command? command, string? name, string[]? args) in commandQueue)
|
||||||
|
|
Loading…
Reference in New Issue