.Any(), .Count() -> .Count or .Length

This commit is contained in:
Eduardo Cáceres
2022-05-02 13:05:22 +02:00
committed by atlimit8
parent 6eb4fe8980
commit 79f321cb44
138 changed files with 233 additions and 258 deletions

View File

@@ -377,7 +377,7 @@ namespace OpenRA
public void EnableScissor(Rectangle rect)
{
// Must remain inside the current scissor rect
if (scissorState.Any())
if (scissorState.Count > 0)
rect = Rectangle.Intersect(rect, scissorState.Peek());
Flush();
@@ -405,7 +405,7 @@ namespace OpenRA
if (renderType == RenderType.World)
{
// Restore previous scissor rect
if (scissorState.Any())
if (scissorState.Count > 0)
{
var rect = scissorState.Peek();
var r = Rectangle.FromLTRB(
@@ -421,7 +421,7 @@ namespace OpenRA
else
{
// Restore previous scissor rect
if (scissorState.Any())
if (scissorState.Count > 0)
{
var rect = scissorState.Peek();
Context.EnableScissor(rect.X, rect.Y, rect.Width, rect.Height);