mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-21 13:50:29 +00:00
* Use childrenMap directly to prevent creating an NSArray in ASDK for ASLayoutSpec children * Add locking for parent property in ASLayoutSpec * Remove unnecessary import * Add newline * Add NSFastEnumeration to ASEnvironment and ASDisplayNode / ASLayoutSpec * Change NSMutableArray initializer to arrayWithCapacity: * Move ASLayoutSpec+Private.h into Private folder Fixes building with Swift * Remove lock for ASLayoutSpec parent
26 lines
743 B
Objective-C
26 lines
743 B
Objective-C
//
|
|
// ASLayoutSpec+Private.h
|
|
// AsyncDisplayKit
|
|
//
|
|
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
|
|
// This source code is licensed under the BSD-style license found in the
|
|
// LICENSE file in the root directory of this source tree. An additional grant
|
|
// of patent rights can be found in the PATENTS file in the same directory.
|
|
//
|
|
|
|
#import "ASLayoutSpec.h"
|
|
|
|
#import <objc/runtime.h>
|
|
#import <map>
|
|
|
|
typedef std::map<unsigned long, id<ASLayoutable>, std::less<unsigned long>> ASChildrenMap;
|
|
|
|
@interface ASLayoutSpec (Private)
|
|
|
|
/*
|
|
* Inside ASDK the childrenMap property should be preferred over the children array to prevent unecessary boxing
|
|
*/
|
|
@property (nonatomic, assign, readonly) ASChildrenMap childrenMap;
|
|
|
|
@end
|