diff --git a/Source/Layout/ASLayout.h b/Source/Layout/ASLayout.h index bc2eea4884..c5d2c26f2b 100644 --- a/Source/Layout/ASLayout.h +++ b/Source/Layout/ASLayout.h @@ -24,9 +24,9 @@ NS_ASSUME_NONNULL_BEGIN ASDISPLAYNODE_EXTERN_C_BEGIN -extern CGPoint const CGPointNull; +extern CGPoint const ASPointNull; // {NAN, NAN} -extern BOOL CGPointIsNull(CGPoint point); +extern BOOL ASPointIsNull(CGPoint point); /** * Safely calculates the layout of the given root layoutElement by guarding against nil nodes. diff --git a/Source/Layout/ASLayout.mm b/Source/Layout/ASLayout.mm index fa4aa01a2b..7f047fab5d 100644 --- a/Source/Layout/ASLayout.mm +++ b/Source/Layout/ASLayout.mm @@ -27,9 +27,9 @@ #import #import -CGPoint const CGPointNull = {NAN, NAN}; +CGPoint const ASPointNull = {NAN, NAN}; -extern BOOL CGPointIsNull(CGPoint point) +extern BOOL ASPointIsNull(CGPoint point) { return isnan(point.x) && isnan(point.y); } @@ -87,7 +87,7 @@ static inline NSString * descriptionIndents(NSUInteger indents) if (self) { #if DEBUG for (ASLayout *sublayout in sublayouts) { - ASDisplayNodeAssert(CGPointIsNull(sublayout.position) == NO, @"Invalid position is not allowed in sublayout."); + ASDisplayNodeAssert(ASPointIsNull(sublayout.position) == NO, @"Invalid position is not allowed in sublayout."); } #endif @@ -104,7 +104,7 @@ static inline NSString * descriptionIndents(NSUInteger indents) } _size = size; - if (CGPointIsNull(position) == NO) { + if (ASPointIsNull(position) == NO) { _position = CGPointMake(ASCeilPixelValue(position.x), ASCeilPixelValue(position.y)); } else { _position = position; @@ -149,7 +149,7 @@ static inline NSString * descriptionIndents(NSUInteger indents) { return [self layoutWithLayoutElement:layoutElement size:size - position:CGPointNull + position:ASPointNull sublayouts:sublayouts]; } @@ -157,7 +157,7 @@ static inline NSString * descriptionIndents(NSUInteger indents) { return [self layoutWithLayoutElement:layoutElement size:size - position:CGPointNull + position:ASPointNull sublayouts:nil]; }