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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user