Skip to content

Commit

Permalink
use Any with ienumerable (#10143)
Browse files Browse the repository at this point in the history
  • Loading branch information
aparajit-pratap authored Nov 19, 2019
1 parent 34b1e0f commit 11b63cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DynamoCore/Scheduler/UpdateRenderPackageAsyncTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private void GetRenderPackagesFromMirrorData(
try
{
graphicItem.Tessellate(package, factory.TessellationParameters);
if (package.MeshVertexColors.Count() > 0)
if (package.MeshVertexColors.Any())
{
package.RequiresPerVertexColoration = true;
}
Expand Down Expand Up @@ -289,12 +289,12 @@ private void GetRenderPackagesFromMirrorData(
// color of 0,0,0,255 (Black), we adjust the color components here.
if (graphicItem is Curve || graphicItem is Surface || graphicItem is Solid || graphicItem is Point)
{
if (package.LineVertexCount > 0 && package.LineStripVertexColors.Count() <= 0)
if (package.LineVertexCount > 0 && !package.LineStripVertexColors.Any())
{
package.ApplyLineVertexColors(CreateColorByteArrayOfSize(package.LineVertexCount, DefR, DefG, DefB, DefA));
}

if (package.PointVertexCount > 0 && package.PointVertexColors.Count() <= 0)
if (package.PointVertexCount > 0 && !package.PointVertexColors.Any())
{
package.ApplyPointVertexColors(CreateColorByteArrayOfSize(package.PointVertexCount, DefR, DefG, DefB, DefA));
}
Expand Down

0 comments on commit 11b63cc

Please sign in to comment.