From ebaa2c157e7c1b047d6434705132e5adee881f74 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 1 Jul 2016 11:47:05 -0700 Subject: [PATCH] Remove aggregate CGRect initializers in ASDataController --- AsyncDisplayKit/Details/ASDataController.mm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index 163b812e10..f9a890e609 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -143,8 +143,9 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; */ - (void)_layoutNode:(ASCellNode *)node withConstrainedSize:(ASSizeRange)constrainedSize { - CGSize size = [node measureWithSizeRange:constrainedSize].size; - node.frame = { .size = size }; + CGRect frame = CGRectZero; + frame.size = [node measureWithSizeRange:constrainedSize].size; + node.frame = frame; } /** @@ -849,8 +850,9 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; for (ASCellNode *node in section) { NSIndexPath *indexPath = [NSIndexPath indexPathForRow:rowIndex inSection:sectionIndex]; ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:kind atIndexPath:indexPath]; - CGSize size = [node measureWithSizeRange:constrainedSize].size; - node.frame = { .size = size }; + CGRect frame = CGRectZero; + frame.size = [node measureWithSizeRange:constrainedSize].size; + node.frame = frame; rowIndex += 1; } sectionIndex += 1;