Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit 7bb3015

Browse files
committed
Rename ASLayoutableContext methods
1 parent 81d2699 commit 7bb3015

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

AsyncDisplayKit/ASDisplayNode.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ - (BOOL)shouldMeasureWithSizeRange:(ASSizeRange)constrainedSize
631631
}
632632

633633
if (ASHierarchyStateIncludesLayoutPending(_hierarchyState)
634-
&& _pendingTransitionID != ASLayoutableGetLayoutableContext().transitionID) {
634+
&& _pendingTransitionID != ASLayoutableGetCurrentContext().transitionID) {
635635
return NO;
636636
}
637637

@@ -679,7 +679,7 @@ - (void)transitionLayoutWithSizeRange:(ASSizeRange)constrainedSize
679679
void (^transitionBlock)() = ^{
680680
ASLayout *newLayout;
681681
{
682-
ASLayoutableSetLayoutableContext(ASLayoutableContextMake(transitionID, NO));
682+
ASLayoutableSetCurrentContext(ASLayoutableContextMake(transitionID, NO));
683683

684684
ASDN::MutexLocker l(_propertyLock);
685685
BOOL disableImplicitHierarchyManagement = self.usesImplicitHierarchyManagement == NO;
@@ -689,7 +689,7 @@ - (void)transitionLayoutWithSizeRange:(ASSizeRange)constrainedSize
689689
self.usesImplicitHierarchyManagement = NO; // Temporary flag for 1.9.x
690690
}
691691

692-
ASLayoutableResetLayoutableContext();
692+
ASLayoutableClearCurrentContext();
693693
}
694694

695695
if ([self _shouldAbortTransitionWithID:transitionID]) {

AsyncDisplayKit/Layout/ASLayoutable.mm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ ASLayoutableContext ASLayoutableContextMake(int32_t transitionID, BOOL needsVisu
2020

2121
static std::map<mach_port_t, ASLayoutableContext> layoutableContextMap;
2222

23-
static inline mach_port_t ASLayoutableGetLayoutableContextKey()
23+
static inline mach_port_t ASLayoutableGetCurrentContextKey()
2424
{
2525
return pthread_mach_thread_np(pthread_self());
2626
}
2727

28-
void ASLayoutableSetLayoutableContext(struct ASLayoutableContext context)
28+
void ASLayoutableSetCurrentContext(struct ASLayoutableContext context)
2929
{
30-
layoutableContextMap[ASLayoutableGetLayoutableContextKey()] = context;
30+
layoutableContextMap[ASLayoutableGetCurrentContextKey()] = context;
3131
}
3232

33-
struct ASLayoutableContext ASLayoutableGetLayoutableContext()
33+
struct ASLayoutableContext ASLayoutableGetCurrentContext()
3434
{
35-
return layoutableContextMap[ASLayoutableGetLayoutableContextKey()];
35+
return layoutableContextMap[ASLayoutableGetCurrentContextKey()];
3636
}
3737

38-
void ASLayoutableResetLayoutableContext() {
39-
layoutableContextMap.erase(ASLayoutableGetLayoutableContextKey());
38+
void ASLayoutableClearCurrentContext() {
39+
layoutableContextMap.erase(ASLayoutableGetCurrentContextKey());
4040
}

AsyncDisplayKit/Layout/ASLayoutablePrivate.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ struct ASLayoutableContext {
2121

2222
extern struct ASLayoutableContext ASLayoutableContextMake(int32_t transitionID, BOOL needsVisualizeNode);
2323

24-
extern void ASLayoutableSetLayoutableContext(struct ASLayoutableContext context);
24+
extern void ASLayoutableSetCurrentContext(struct ASLayoutableContext context);
2525

26-
extern struct ASLayoutableContext ASLayoutableGetLayoutableContext();
26+
extern struct ASLayoutableContext ASLayoutableGetCurrentContext();
2727

28-
extern void ASLayoutableResetLayoutableContext();
28+
extern void ASLayoutableClearCurrentContext();
2929

3030
/**
3131
* The base protocol for ASLayoutable. Generally the methods/properties in this class do not need to be

0 commit comments

Comments
 (0)