Misc changes to reduce allocation:

- Avoid creating new strings in SpriteRenderer.Flush.
- ProductionQueue.CancelUnbuildableItems can exit early if the queue is empty. It can also use a set of names for quicker lookups.
- OpenGL.CheckGLError avoids a Enum.HasFlag call.
This commit is contained in:
RoosterDragon
2020-10-11 12:02:19 +01:00
committed by abcdefg30
parent c23efea402
commit e11c8436bd
3 changed files with 11 additions and 4 deletions

View File

@@ -740,7 +740,7 @@ namespace OpenRA.Platforms.Default
public static void CheckGLError()
{
// Let the debug message handler log the errors instead.
if (Features.HasFlag(GLFeatures.DebugMessagesCallback))
if ((Features & GLFeatures.DebugMessagesCallback) == GLFeatures.DebugMessagesCallback)
return;
var type = glGetError();