mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Revert "[ASLayoutSpec] Use childrenMap directly to prevent creating an NSArray within ASDK (#1937)"
Something interesting going on here with ARC / Objective-C++ that we are investigating and will re-land.
This reverts commit c90ed08d10.
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
|
||||
#import "ASStaticLayoutSpec.h"
|
||||
|
||||
#import "ASLayoutSpec+Private.h"
|
||||
#import "ASLayoutSpecUtilities.h"
|
||||
#import "ASLayout.h"
|
||||
|
||||
@@ -39,8 +38,10 @@
|
||||
{
|
||||
CGSize maxConstrainedSize = CGSizeMake(constrainedSize.max.width, constrainedSize.max.height);
|
||||
|
||||
NSMutableArray *sublayouts = [NSMutableArray arrayWithCapacity:self.childrenMap.size()];
|
||||
for (id<ASLayoutable> child in self) {
|
||||
NSArray *children = self.children;
|
||||
NSMutableArray *sublayouts = [NSMutableArray arrayWithCapacity:children.count];
|
||||
|
||||
for (id<ASLayoutable> child in children) {
|
||||
CGPoint layoutPosition = child.layoutPosition;
|
||||
CGSize autoMaxSize = CGSizeMake(maxConstrainedSize.width - layoutPosition.x,
|
||||
maxConstrainedSize.height - layoutPosition.y);
|
||||
|
||||
Reference in New Issue
Block a user