Skip to content

Commit

Permalink
Use AS_ARRAY_SIZE for array counting (facebookarchive#1600)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanton authored and nguyenhuy committed Jul 28, 2019
1 parent 67f2ea5 commit b933f66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Private/_ASCoreAnimationExtras.mm
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void ASDisplayNodeSetResizableContents(id<ASResizableContents> obj, UIImage *ima
{UIViewContentModeBottomLeft, kCAGravityTopLeft},
{UIViewContentModeBottomRight, kCAGravityTopRight},
};
*count = sizeof(sUIContentModeCAGravityLUT) / sizeof(sUIContentModeCAGravityLUT[0]);
*count = AS_ARRAY_SIZE(sUIContentModeCAGravityLUT);
return sUIContentModeCAGravityLUT;
}

Expand All @@ -103,7 +103,7 @@ void ASDisplayNodeSetResizableContents(id<ASResizableContents> obj, UIImage *ima
{UIViewContentModeBottomLeft, @"bottomLeft"},
{UIViewContentModeBottomRight, @"bottomRight"},
};
*count = sizeof(sUIContentModeDescriptionLUT) / sizeof(sUIContentModeDescriptionLUT[0]);
*count = AS_ARRAY_SIZE(sUIContentModeDescriptionLUT);
return sUIContentModeDescriptionLUT;
}

Expand Down

0 comments on commit b933f66

Please sign in to comment.