Skip to content

Commit

Permalink
Move unavailable init into header
Browse files Browse the repository at this point in the history
  • Loading branch information
maicki authored and Adlai-Holler committed Jul 18, 2018
1 parent f2d0518 commit 76f1e20
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 21 deletions.
6 changes: 2 additions & 4 deletions Source/Layout/ASLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,14 @@ AS_EXTERN ASLayout *ASCalculateLayout(id<ASLayoutElement>layoutElement, const AS
*/
+ (instancetype)layoutWithLayoutElement:(id<ASLayoutElement>)layoutElement
size:(CGSize)size NS_RETURNS_RETAINED AS_WARN_UNUSED_RESULT;

/**
* Traverses the existing layout tree and generates a new tree that represents only ASDisplayNode layouts
*/
- (ASLayout *)filteredNodeLayoutTree NS_RETURNS_RETAINED AS_WARN_UNUSED_RESULT;

@end

@interface ASLayout (Unavailable)

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)new NS_UNAVAILABLE;

@end

Expand Down
6 changes: 0 additions & 6 deletions Source/Layout/ASLayout.mm
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,6 @@ - (instancetype)initWithLayoutElement:(id<ASLayoutElement>)layoutElement
return self;
}

- (instancetype)init
{
ASDisplayNodeAssert(NO, @"Use the designated initializer");
return [self init];
}

#pragma mark - Class Constructors

+ (instancetype)layoutWithLayoutElement:(id<ASLayoutElement>)layoutElement
Expand Down
7 changes: 2 additions & 5 deletions Source/Private/ASLayoutTransition.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,8 @@ AS_SUBCLASSING_RESTRICTED
*/
- (void)applySubnodeRemovals;

@end

@interface ASLayoutTransition (Unavailable)

- (instancetype)init __unavailable;
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)new NS_UNAVAILABLE;

@end

Expand Down
6 changes: 0 additions & 6 deletions Source/Private/ASLayoutTransition.mm
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ - (instancetype)initWithNode:(ASDisplayNode *)node
return self;
}

- (instancetype)init
{
ASDisplayNodeAssert(NO, @"Use the designated initializer");
return [self init];
}

- (BOOL)isSynchronous
{
ASDN::MutexSharedLocker l(__instanceLock__);
Expand Down

0 comments on commit 76f1e20

Please sign in to comment.