From b933f661b9b51d445d7491b7535bd1a590c54234 Mon Sep 17 00:00:00 2001 From: Hanton Date: Mon, 29 Jul 2019 04:07:54 +0800 Subject: [PATCH] Use AS_ARRAY_SIZE for array counting (#1600) --- Source/Private/_ASCoreAnimationExtras.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Private/_ASCoreAnimationExtras.mm b/Source/Private/_ASCoreAnimationExtras.mm index b55bd6442f..a26266b29d 100644 --- a/Source/Private/_ASCoreAnimationExtras.mm +++ b/Source/Private/_ASCoreAnimationExtras.mm @@ -80,7 +80,7 @@ void ASDisplayNodeSetResizableContents(id obj, UIImage *ima {UIViewContentModeBottomLeft, kCAGravityTopLeft}, {UIViewContentModeBottomRight, kCAGravityTopRight}, }; - *count = sizeof(sUIContentModeCAGravityLUT) / sizeof(sUIContentModeCAGravityLUT[0]); + *count = AS_ARRAY_SIZE(sUIContentModeCAGravityLUT); return sUIContentModeCAGravityLUT; } @@ -103,7 +103,7 @@ void ASDisplayNodeSetResizableContents(id obj, UIImage *ima {UIViewContentModeBottomLeft, @"bottomLeft"}, {UIViewContentModeBottomRight, @"bottomRight"}, }; - *count = sizeof(sUIContentModeDescriptionLUT) / sizeof(sUIContentModeDescriptionLUT[0]); + *count = AS_ARRAY_SIZE(sUIContentModeDescriptionLUT); return sUIContentModeDescriptionLUT; }