Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Texture Xcode project to 11.4 and fix resulting warnings - 4 #1838

Merged
merged 2 commits into from
May 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions AsyncDisplayKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2189,7 +2189,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = AS;
LastUpgradeCheck = 0940;
LastUpgradeCheck = 1140;
ORGANIZATIONNAME = Pinterest;
TargetAttributes = {
057D02BE1AC0A66700C7AC3C = {
Expand All @@ -2205,10 +2205,9 @@
};
buildConfigurationList = 058D09A7195D04C000B7D73C /* Build configuration list for PBXProject "AsyncDisplayKit" */;
compatibilityVersion = "Xcode 6.3";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -2624,13 +2623,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -2682,13 +2683,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -2840,13 +2843,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
LastUpgradeVersion = "1140"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
4 changes: 2 additions & 2 deletions Source/ASCellNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ - (void)setSelected:(BOOL)selected
if (ASLockedSelfCompareAssign(_selected, selected)) {
if (!_suspendInteractionDelegate) {
ASPerformBlockOnMainThread(^{
[_interactionDelegate nodeSelectedStateDidChange:self];
[self->_interactionDelegate nodeSelectedStateDidChange:self];
});
}
}
Expand All @@ -153,7 +153,7 @@ - (void)setHighlighted:(BOOL)highlighted
if (ASLockedSelfCompareAssign(_highlighted, highlighted)) {
if (!_suspendInteractionDelegate) {
ASPerformBlockOnMainThread(^{
[_interactionDelegate nodeHighlightedStateDidChange:self];
[self->_interactionDelegate nodeHighlightedStateDidChange:self];
});
}
}
Expand Down
16 changes: 8 additions & 8 deletions Source/ASCollectionView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

// ASCellLayoutMode is an NSUInteger-based NS_OPTIONS field. Be careful with BOOL handling on the
// 32-bit Objective-C runtime, and pattern after ASInterfaceStateIncludesVisible() & friends.
#define ASCellLayoutModeIncludes(layoutMode) ((_cellLayoutMode & layoutMode) == layoutMode)
#define ASCellLayoutModeIncludes(layoutMode) ((self->_cellLayoutMode & layoutMode) == layoutMode)

/// What, if any, invalidation should we perform during the next -layoutSubviews.
typedef NS_ENUM(NSUInteger, ASCollectionViewInvalidationStyle) {
Expand Down Expand Up @@ -1875,14 +1875,14 @@ - (void)_beginBatchFetching
if (_asyncDelegateFlags.collectionNodeWillBeginBatchFetch) {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
GET_COLLECTIONNODE_OR_RETURN(collectionNode, (void)0);
os_log_debug(ASCollectionLog(), "Beginning batch fetch for %@ with context %@", collectionNode, _batchContext);
[_asyncDelegate collectionNode:collectionNode willBeginBatchFetchWithContext:_batchContext];
os_log_debug(ASCollectionLog(), "Beginning batch fetch for %@ with context %@", collectionNode, self->_batchContext);
[self->_asyncDelegate collectionNode:collectionNode willBeginBatchFetchWithContext:self->_batchContext];
});
} else if (_asyncDelegateFlags.collectionViewWillBeginBatchFetch) {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[_asyncDelegate collectionView:self willBeginBatchFetchWithContext:_batchContext];
[self->_asyncDelegate collectionView:self willBeginBatchFetchWithContext:self->_batchContext];
#pragma clang diagnostic pop
});
}
Expand Down Expand Up @@ -2248,20 +2248,20 @@ - (void)rangeController:(ASRangeController *)rangeController updateWithChangeSet
ASPerformBlockWithoutAnimation(!changeSet.animated, ^{
as_activity_scope(as_activity_create("Commit collection update", changeSet.rootActivity, OS_ACTIVITY_FLAG_DEFAULT));
if (changeSet.includesReloadData) {
_superIsPendingDataLoad = YES;
self->_superIsPendingDataLoad = YES;
updates();
[self _superReloadData:nil completion:nil];
os_log_debug(ASCollectionLog(), "Did reloadData %@", self.collectionNode);
[changeSet executeCompletionHandlerWithFinished:YES];
} else {
[_layoutFacilitator collectionViewWillPerformBatchUpdates];
[self->_layoutFacilitator collectionViewWillPerformBatchUpdates];

__block NSUInteger numberOfUpdates = 0;
const auto completion = ^(BOOL finished) {
as_activity_scope(as_activity_create("Handle collection update completion", changeSet.rootActivity, OS_ACTIVITY_FLAG_DEFAULT));
as_log_verbose(ASCollectionLog(), "Update animation finished %{public}@", self.collectionNode);
// Flush any range changes that happened as part of the update animations ending.
[_rangeController updateIfNeeded];
[self->_rangeController updateIfNeeded];
[self _scheduleCheckForBatchFetchingForNumberOfChanges:numberOfUpdates];
[changeSet executeCompletionHandlerWithFinished:finished];
};
Expand Down Expand Up @@ -2317,7 +2317,7 @@ - (void)rangeController:(ASRangeController *)rangeController updateWithChangeSet

// Flush any range changes that happened as part of submitting the update.
as_activity_scope(changeSet.rootActivity);
[_rangeController updateIfNeeded];
[self->_rangeController updateIfNeeded];
}
});
}
Expand Down
18 changes: 9 additions & 9 deletions Source/ASControlNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@ - (void)addTarget:(id)target action:(SEL)action forControlEvents:(ASControlNodeE
dispatch_async(dispatch_get_main_queue(), ^{
// add a highlight overlay node with area of ASControlNode + UIEdgeInsets
self.clipsToBounds = NO;
_debugHighlightOverlay = [[ASImageNode alloc] init];
_debugHighlightOverlay.zPosition = 1000; // ensure we're over the top of any siblings
_debugHighlightOverlay.layerBacked = YES;
[self addSubnode:_debugHighlightOverlay];
self->_debugHighlightOverlay = [[ASImageNode alloc] init];
self->_debugHighlightOverlay.zPosition = 1000; // ensure we're over the top of any siblings
self->_debugHighlightOverlay.layerBacked = YES;
[self addSubnode:self->_debugHighlightOverlay];
});
}
}
Expand All @@ -316,7 +316,7 @@ - (void)addTarget:(id)target action:(SEL)action forControlEvents:(ASControlNodeE
{
// Do we already have an event table for this control event?
id<NSCopying> eventKey = _ASControlNodeEventKeyForControlEvent(controlEvent);
NSMutableArray *eventTargetActionArray = _controlEventDispatchTable[eventKey];
NSMutableArray *eventTargetActionArray = self->_controlEventDispatchTable[eventKey];

if (!eventTargetActionArray) {
eventTargetActionArray = [[NSMutableArray alloc] init];
Expand All @@ -329,7 +329,7 @@ - (void)addTarget:(id)target action:(SEL)action forControlEvents:(ASControlNodeE
[eventTargetActionArray addObject:targetAction];

if (eventKey) {
[_controlEventDispatchTable setObject:eventTargetActionArray forKey:eventKey];
[self->_controlEventDispatchTable setObject:eventTargetActionArray forKey:eventKey];
}
});

Expand Down Expand Up @@ -390,7 +390,7 @@ - (void)removeTarget:(id)target action:(SEL)action forControlEvents:(ASControlNo
{
// Grab the dispatch table for this event (if we have it).
id<NSCopying> eventKey = _ASControlNodeEventKeyForControlEvent(controlEvent);
NSMutableArray *eventTargetActionArray = _controlEventDispatchTable[eventKey];
NSMutableArray *eventTargetActionArray = self->_controlEventDispatchTable[eventKey];
if (!eventTargetActionArray) {
return;
}
Expand All @@ -410,7 +410,7 @@ - (void)removeTarget:(id)target action:(SEL)action forControlEvents:(ASControlNo

if (eventTargetActionArray.count == 0) {
// If there are no targets for this event anymore, remove it.
[_controlEventDispatchTable removeObjectForKey:eventKey];
[self->_controlEventDispatchTable removeObjectForKey:eventKey];
}
});
}
Expand All @@ -432,7 +432,7 @@ - (void)sendActionsForControlEvents:(ASControlNodeEvent)controlEvents withEvent:
(ASControlNodeEvent controlEvent)
{
// Iterate on each target action pair
for (ASControlTargetAction *targetAction in _controlEventDispatchTable[_ASControlNodeEventKeyForControlEvent(controlEvent)]) {
for (ASControlTargetAction *targetAction in self->_controlEventDispatchTable[_ASControlNodeEventKeyForControlEvent(controlEvent)]) {
ASControlTargetAction *resolvedTargetAction = [[ASControlTargetAction alloc] init];
resolvedTargetAction.action = targetAction.action;
resolvedTargetAction.target = targetAction.target;
Expand Down
16 changes: 8 additions & 8 deletions Source/ASDisplayNode+Layout.mm
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ - (void)transitionLayoutWithSizeRange:(ASSizeRange)constrainedSize
as_log_verbose(ASLayoutLog(), "Transition ID is %d", transitionID);
// NOTE: This block captures self. It's cheaper than hitting the weak table.
asdisplaynode_iscancelled_block_t isCancelled = ^{
BOOL result = (_transitionID != transitionID);
BOOL result = (self->_transitionID != transitionID);
if (result) {
as_log_verbose(ASLayoutLog(), "Transition %d canceled, superseded by %d", transitionID, _transitionID.load());
}
Expand All @@ -677,7 +677,7 @@ - (void)transitionLayoutWithSizeRange:(ASSizeRange)constrainedSize
}

// Perform a full layout creation pass with passed in constrained size to create the new layout for the transition
NSUInteger newLayoutVersion = _layoutVersion;
NSUInteger newLayoutVersion = self->_layoutVersion;
ASLayout *newLayout;
{
ASScopedLockSelfOrToRoot();
Expand Down Expand Up @@ -712,23 +712,23 @@ - (void)transitionLayoutWithSizeRange:(ASSizeRange)constrainedSize
{
// Grab __instanceLock__ here to make sure this transition isn't invalidated
// right after it passed the validation test and before it proceeds
MutexLocker l(__instanceLock__);
MutexLocker l(self->__instanceLock__);

// Update calculated layout
const auto previousLayout = _calculatedDisplayNodeLayout;
const auto previousLayout = self->_calculatedDisplayNodeLayout;
const auto pendingLayout = ASDisplayNodeLayout(newLayout,
constrainedSize,
constrainedSize.max,
newLayoutVersion);
[self _locked_setCalculatedDisplayNodeLayout:pendingLayout];

// Setup pending layout transition for animation
_pendingLayoutTransition = pendingLayoutTransition = [[ASLayoutTransition alloc] initWithNode:self
self->_pendingLayoutTransition = pendingLayoutTransition = [[ASLayoutTransition alloc] initWithNode:self
pendingLayout:pendingLayout
previousLayout:previousLayout];
// Setup context for pending layout transition. we need to hold a strong reference to the context
_pendingLayoutTransitionContext = pendingLayoutTransitionContext = [[_ASTransitionContext alloc] initWithAnimation:animated
layoutDelegate:_pendingLayoutTransition
self->_pendingLayoutTransitionContext = pendingLayoutTransitionContext = [[_ASTransitionContext alloc] initWithAnimation:animated
layoutDelegate:self->_pendingLayoutTransition
completionDelegate:self];
}

Expand Down Expand Up @@ -1043,7 +1043,7 @@ - (void)_pendingLayoutTransitionDidComplete
if (self.isNodeLoaded) {
ASPerformBlockOnMainThread(^{
if (self.contents == nil) {
_placeholderImage = [self placeholderImage];
self->_placeholderImage = [self placeholderImage];
}
});
} else {
Expand Down
Loading