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

Commit b8872c2

Browse files
authored
[AsyncDisplayKit] Fix a few comment typos and minor compiler strictness warnings. (#2932)
1 parent 38f1efd commit b8872c2

9 files changed

Lines changed: 17 additions & 17 deletions

File tree

AsyncDisplayKit/ASDisplayNode.mm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ + (void)initialize
225225
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(calculatedSize)), @"Subclass %@ must not override calculatedSize method.", classString);
226226
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(calculatedLayout)), @"Subclass %@ must not override calculatedLayout method.", classString);
227227
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(measure:)), @"Subclass %@ must not override measure: method", classString);
228-
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(measureWithSizeRange:)), @"Subclass %@ must not override measureWithSizeRange: method. Instead overwrite calculateLayoutThatFits:", classString);
229-
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(layoutThatFits:)), @"Subclass %@ must not override layoutThatFits: method. Instead overwrite calculateLayoutThatFits:.", classString);
230-
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(layoutThatFits:parentSize:)), @"Subclass %@ must not override layoutThatFits:parentSize method. Instead overwrite calculateLayoutThatFits:.", classString);
228+
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(measureWithSizeRange:)), @"Subclass %@ must not override measureWithSizeRange: method. Instead override calculateLayoutThatFits:", classString);
229+
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(layoutThatFits:)), @"Subclass %@ must not override layoutThatFits: method. Instead override calculateLayoutThatFits:.", classString);
230+
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(layoutThatFits:parentSize:)), @"Subclass %@ must not override layoutThatFits:parentSize method. Instead override calculateLayoutThatFits:.", classString);
231231
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(recursivelyClearContents)), @"Subclass %@ must not override recursivelyClearContents method.", classString);
232232
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(recursivelyClearPreloadedData)), @"Subclass %@ must not override recursivelyClearFetchedData method.", classString);
233233
}
@@ -2917,7 +2917,7 @@ - (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize
29172917

29182918
- (void)setLayoutSpecBlock:(ASLayoutSpecBlock)layoutSpecBlock
29192919
{
2920-
// For now there should never be an overwrite of layoutSpecThatFits: / layoutElementThatFits: and a layoutSpecBlock
2920+
// For now there should never be an override of layoutSpecThatFits: / layoutElementThatFits: and a layoutSpecBlock
29212921
ASDisplayNodeAssert(!(_methodOverrides & ASDisplayNodeMethodOverrideLayoutSpecThatFits), @"Overwriting layoutSpecThatFits: and providing a layoutSpecBlock block is currently not supported");
29222922

29232923
ASDN::MutexLocker l(__instanceLock__);

AsyncDisplayKit/ASVideoNode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN
4444
@property (nullable, nonatomic, strong, readwrite) AVAsset *asset;
4545
/**
4646
** @abstract The URL with which the asset was initialized.
47-
** @discussion Setting the URL will overwrite the current asset with a newly created AVURLAsset created from the given URL, and AVAsset *asset will point to that newly created AVURLAsset. Please don't set both assetURL and asset.
47+
** @discussion Setting the URL will override the current asset with a newly created AVURLAsset created from the given URL, and AVAsset *asset will point to that newly created AVURLAsset. Please don't set both assetURL and asset.
4848
** @return Current URL the asset was initialized or nil if no URL was given.
4949
**/
5050
@property (nullable, nonatomic, strong, readwrite) NSURL *assetURL;

AsyncDisplayKit/Debug/ASLayoutElementInspectorCell.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ - (void)valueChangedToIndex:(NSUInteger)index
185185
switch (_propertyType) {
186186

187187
case ASLayoutElementPropertyAlignSelf:
188-
_layoutElementToEdit.style.alignSelf = index;
188+
_layoutElementToEdit.style.alignSelf = (ASStackLayoutAlignSelf)index;
189189
_textNode.attributedText = [ASLayoutElementInspectorCell attributedStringFromString:[ASLayoutElementInspectorCell alignSelfEnumValueString:index]];
190190
break;
191191

AsyncDisplayKit/Details/ASRangeController.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#import "ASDisplayNodeExtras.h"
1616
#import "ASDisplayNodeInternal.h" // Required for interfaceState and hierarchyState setter methods.
1717
#import "ASInternalHelpers.h"
18-
#import "ASMultiDimensionalArrayUtils.h"
18+
#import "ASMultidimensionalArrayUtils.h"
1919
#import "ASWeakSet.h"
2020

2121
#import "ASDisplayNode+FrameworkPrivate.h"

AsyncDisplayKit/Details/ASTraitCollection.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ + (ASTraitCollection *)traitCollectionWithUITraitCollection:(UITraitCollection *
7777
userInterfaceIdiom:traitCollection.userInterfaceIdiom
7878
horizontalSizeClass:traitCollection.horizontalSizeClass
7979
verticalSizeClass:traitCollection.verticalSizeClass
80-
forceTouchCapability:0
80+
forceTouchCapability:UIForceTouchCapabilityUnknown
8181
containerSize:windowSize];
8282
} else {
8383
asyncTraitCollection = [[[self class] alloc] init];

AsyncDisplayKit/Layout/ASLayoutSpec.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ + (void)initialize
3333
{
3434
[super initialize];
3535
if (self != [ASLayoutSpec class]) {
36-
ASDisplayNodeAssert(!ASSubclassOverridesSelector([ASLayoutSpec class], self, @selector(measureWithSizeRange:)), @"Subclass %@ must not override measureWithSizeRange: method. Instead overwrite calculateLayoutThatFits:", NSStringFromClass(self));
36+
ASDisplayNodeAssert(!ASSubclassOverridesSelector([ASLayoutSpec class], self, @selector(measureWithSizeRange:)), @"Subclass %@ must not override measureWithSizeRange: method. Instead override calculateLayoutThatFits:", NSStringFromClass(self));
3737
}
3838
}
3939

AsyncDisplayKit/Private/ASImageNode+CGExtras.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void ASCroppedImageBackingSizeAndDrawRectInBounds(CGSize sourceImageSize,
6767
}
6868

6969
// If fitting the desired aspect ratio to the image size actually results in a larger buffer, use the input values.
70-
// However, if there is a pixel savings (e.g. we would have to upscale the image), overwrite the function arguments.
70+
// However, if there is a pixel savings (e.g. we would have to upscale the image), override the function arguments.
7171
if (CGSizeEqualToSize(CGSizeZero, forcedSize) == NO) {
7272
destinationWidth = (size_t)round(forcedSize.width);
7373
destinationHeight = (size_t)round(forcedSize.height);

AsyncDisplayKit/Private/ASInternalHelpers.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,19 @@ void ASPerformBackgroundDeallocation(id object)
8484
[[ASDeallocQueue sharedDeallocationQueue] releaseObjectInBackground:object];
8585
}
8686

87-
BOOL ASClassRequiresMainThreadDeallocation(Class class)
87+
BOOL ASClassRequiresMainThreadDeallocation(Class c)
8888
{
89-
if (class == [UIImage class] || class == [UIColor class]) {
89+
if (c == [UIImage class] || c == [UIColor class]) {
9090
return NO;
9191
}
9292

93-
if ([class isSubclassOfClass:[UIResponder class]]
94-
|| [class isSubclassOfClass:[CALayer class]]
95-
|| [class isSubclassOfClass:[UIGestureRecognizer class]]) {
93+
if ([c isSubclassOfClass:[UIResponder class]]
94+
|| [c isSubclassOfClass:[CALayer class]]
95+
|| [c isSubclassOfClass:[UIGestureRecognizer class]]) {
9696
return YES;
9797
}
9898

99-
const char *name = class_getName(class);
99+
const char *name = class_getName(c);
100100
if (strncmp(name, "UI", 2) == 0 || strncmp(name, "AV", 2) == 0 || strncmp(name, "CA", 2) == 0) {
101101
return YES;
102102
}

AsyncDisplayKit/UIImage+ASConvenience.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ + (UIImage *)as_resizableRoundedImageWithCornerRadius:(CGFloat)cornerRadius
9090
if (cornerColor) {
9191
contextIsClean = NO;
9292
[cornerColor setFill];
93-
// Copy "blend" mode is extra fast because it disregards any value currently in the buffer and overwrites directly.
93+
// Copy "blend" mode is extra fast because it disregards any value currently in the buffer and overrides directly.
9494
UIRectFillUsingBlendMode(bounds, kCGBlendModeCopy);
9595
}
9696

0 commit comments

Comments
 (0)