[AsyncDisplayKit] Fix a few comment typos and minor compiler strictness warnings. (#2932)

This commit is contained in:
appleguy
2017-01-25 12:53:13 -08:00
committed by GitHub
parent 38f1efd448
commit b8872c24db
9 changed files with 17 additions and 17 deletions

View File

@@ -225,9 +225,9 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(calculatedSize)), @"Subclass %@ must not override calculatedSize method.", classString);
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(calculatedLayout)), @"Subclass %@ must not override calculatedLayout method.", classString);
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(measure:)), @"Subclass %@ must not override measure: method", classString);
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(measureWithSizeRange:)), @"Subclass %@ must not override measureWithSizeRange: method. Instead overwrite calculateLayoutThatFits:", classString);
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(layoutThatFits:)), @"Subclass %@ must not override layoutThatFits: method. Instead overwrite calculateLayoutThatFits:.", classString);
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(layoutThatFits:parentSize:)), @"Subclass %@ must not override layoutThatFits:parentSize method. Instead overwrite calculateLayoutThatFits:.", classString);
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(measureWithSizeRange:)), @"Subclass %@ must not override measureWithSizeRange: method. Instead override calculateLayoutThatFits:", classString);
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(layoutThatFits:)), @"Subclass %@ must not override layoutThatFits: method. Instead override calculateLayoutThatFits:.", classString);
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(layoutThatFits:parentSize:)), @"Subclass %@ must not override layoutThatFits:parentSize method. Instead override calculateLayoutThatFits:.", classString);
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(recursivelyClearContents)), @"Subclass %@ must not override recursivelyClearContents method.", classString);
ASDisplayNodeAssert(!ASDisplayNodeSubclassOverridesSelector(self, @selector(recursivelyClearPreloadedData)), @"Subclass %@ must not override recursivelyClearFetchedData method.", classString);
}
@@ -2917,7 +2917,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock)
- (void)setLayoutSpecBlock:(ASLayoutSpecBlock)layoutSpecBlock
{
// For now there should never be an overwrite of layoutSpecThatFits: / layoutElementThatFits: and a layoutSpecBlock
// For now there should never be an override of layoutSpecThatFits: / layoutElementThatFits: and a layoutSpecBlock
ASDisplayNodeAssert(!(_methodOverrides & ASDisplayNodeMethodOverrideLayoutSpecThatFits), @"Overwriting layoutSpecThatFits: and providing a layoutSpecBlock block is currently not supported");
ASDN::MutexLocker l(__instanceLock__);

View File

@@ -44,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, nonatomic, strong, readwrite) AVAsset *asset;
/**
** @abstract The URL with which the asset was initialized.
** @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.
** @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.
** @return Current URL the asset was initialized or nil if no URL was given.
**/
@property (nullable, nonatomic, strong, readwrite) NSURL *assetURL;

View File

@@ -185,7 +185,7 @@ __weak static ASLayoutElementInspectorCell *__currentlyOpenedCell = nil;
switch (_propertyType) {
case ASLayoutElementPropertyAlignSelf:
_layoutElementToEdit.style.alignSelf = index;
_layoutElementToEdit.style.alignSelf = (ASStackLayoutAlignSelf)index;
_textNode.attributedText = [ASLayoutElementInspectorCell attributedStringFromString:[ASLayoutElementInspectorCell alignSelfEnumValueString:index]];
break;

View File

@@ -15,7 +15,7 @@
#import "ASDisplayNodeExtras.h"
#import "ASDisplayNodeInternal.h" // Required for interfaceState and hierarchyState setter methods.
#import "ASInternalHelpers.h"
#import "ASMultiDimensionalArrayUtils.h"
#import "ASMultidimensionalArrayUtils.h"
#import "ASWeakSet.h"
#import "ASDisplayNode+FrameworkPrivate.h"

View File

@@ -77,7 +77,7 @@
userInterfaceIdiom:traitCollection.userInterfaceIdiom
horizontalSizeClass:traitCollection.horizontalSizeClass
verticalSizeClass:traitCollection.verticalSizeClass
forceTouchCapability:0
forceTouchCapability:UIForceTouchCapabilityUnknown
containerSize:windowSize];
} else {
asyncTraitCollection = [[[self class] alloc] init];

View File

@@ -33,7 +33,7 @@
{
[super initialize];
if (self != [ASLayoutSpec class]) {
ASDisplayNodeAssert(!ASSubclassOverridesSelector([ASLayoutSpec class], self, @selector(measureWithSizeRange:)), @"Subclass %@ must not override measureWithSizeRange: method. Instead overwrite calculateLayoutThatFits:", NSStringFromClass(self));
ASDisplayNodeAssert(!ASSubclassOverridesSelector([ASLayoutSpec class], self, @selector(measureWithSizeRange:)), @"Subclass %@ must not override measureWithSizeRange: method. Instead override calculateLayoutThatFits:", NSStringFromClass(self));
}
}

View File

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

View File

@@ -84,19 +84,19 @@ void ASPerformBackgroundDeallocation(id object)
[[ASDeallocQueue sharedDeallocationQueue] releaseObjectInBackground:object];
}
BOOL ASClassRequiresMainThreadDeallocation(Class class)
BOOL ASClassRequiresMainThreadDeallocation(Class c)
{
if (class == [UIImage class] || class == [UIColor class]) {
if (c == [UIImage class] || c == [UIColor class]) {
return NO;
}
if ([class isSubclassOfClass:[UIResponder class]]
|| [class isSubclassOfClass:[CALayer class]]
|| [class isSubclassOfClass:[UIGestureRecognizer class]]) {
if ([c isSubclassOfClass:[UIResponder class]]
|| [c isSubclassOfClass:[CALayer class]]
|| [c isSubclassOfClass:[UIGestureRecognizer class]]) {
return YES;
}
const char *name = class_getName(class);
const char *name = class_getName(c);
if (strncmp(name, "UI", 2) == 0 || strncmp(name, "AV", 2) == 0 || strncmp(name, "CA", 2) == 0) {
return YES;
}

View File

@@ -90,7 +90,7 @@
if (cornerColor) {
contextIsClean = NO;
[cornerColor setFill];
// Copy "blend" mode is extra fast because it disregards any value currently in the buffer and overwrites directly.
// Copy "blend" mode is extra fast because it disregards any value currently in the buffer and overrides directly.
UIRectFillUsingBlendMode(bounds, kCGBlendModeCopy);
}