mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-16 11:20:18 +00:00
[CGPointNull] Rename globally exported C function to avoid collisions #trivial (#62)
* [CGPointNull] Rename globally exported C function to avoid collisions. Some other frameworks also declare this. Let's try to minimize collisions without making the name too ugly. * Fix build errors
This commit is contained in:
parent
fbb14f5c7c
commit
32c036f440
@ -24,9 +24,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
ASDISPLAYNODE_EXTERN_C_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.
|
* Safely calculates the layout of the given root layoutElement by guarding against nil nodes.
|
||||||
|
|||||||
@ -27,9 +27,9 @@
|
|||||||
#import <AsyncDisplayKit/ASObjectDescriptionHelpers.h>
|
#import <AsyncDisplayKit/ASObjectDescriptionHelpers.h>
|
||||||
#import <AsyncDisplayKit/ASRectTable.h>
|
#import <AsyncDisplayKit/ASRectTable.h>
|
||||||
|
|
||||||
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);
|
return isnan(point.x) && isnan(point.y);
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ static inline NSString * descriptionIndents(NSUInteger indents)
|
|||||||
if (self) {
|
if (self) {
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
for (ASLayout *sublayout in sublayouts) {
|
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
|
#endif
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ static inline NSString * descriptionIndents(NSUInteger indents)
|
|||||||
}
|
}
|
||||||
_size = size;
|
_size = size;
|
||||||
|
|
||||||
if (CGPointIsNull(position) == NO) {
|
if (ASPointIsNull(position) == NO) {
|
||||||
_position = CGPointMake(ASCeilPixelValue(position.x), ASCeilPixelValue(position.y));
|
_position = CGPointMake(ASCeilPixelValue(position.x), ASCeilPixelValue(position.y));
|
||||||
} else {
|
} else {
|
||||||
_position = position;
|
_position = position;
|
||||||
@ -149,7 +149,7 @@ static inline NSString * descriptionIndents(NSUInteger indents)
|
|||||||
{
|
{
|
||||||
return [self layoutWithLayoutElement:layoutElement
|
return [self layoutWithLayoutElement:layoutElement
|
||||||
size:size
|
size:size
|
||||||
position:CGPointNull
|
position:ASPointNull
|
||||||
sublayouts:sublayouts];
|
sublayouts:sublayouts];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ static inline NSString * descriptionIndents(NSUInteger indents)
|
|||||||
{
|
{
|
||||||
return [self layoutWithLayoutElement:layoutElement
|
return [self layoutWithLayoutElement:layoutElement
|
||||||
size:size
|
size:size
|
||||||
position:CGPointNull
|
position:ASPointNull
|
||||||
sublayouts:nil];
|
sublayouts:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user