mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-03 21:16:35 +00:00
Use correct format identifiers for logs on 64 bit systems.
This commit is contained in:
parent
f59f4c0b63
commit
a38e86f039
@ -700,7 +700,10 @@ static bool disableNotificationsForMovingBetweenParents(ASDisplayNode *from, ASD
|
|||||||
if (canUseViewAPI && sublayerIndex != NSNotFound) {
|
if (canUseViewAPI && sublayerIndex != NSNotFound) {
|
||||||
[_view insertSubview:subnode.view atIndex:sublayerIndex];
|
[_view insertSubview:subnode.view atIndex:sublayerIndex];
|
||||||
} else if (sublayerIndex != NSNotFound) {
|
} else if (sublayerIndex != NSNotFound) {
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wconversion"
|
||||||
[_layer insertSublayer:subnode.layer atIndex:sublayerIndex];
|
[_layer insertSublayer:subnode.layer atIndex:sublayerIndex];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -840,7 +843,7 @@ static NSInteger incrementIfFound(NSInteger i) {
|
|||||||
ASDN::MutexLocker l(_propertyLock);
|
ASDN::MutexLocker l(_propertyLock);
|
||||||
|
|
||||||
if (idx > _subnodes.count || idx < 0) {
|
if (idx > _subnodes.count || idx < 0) {
|
||||||
NSString *reason = [NSString stringWithFormat:@"Cannot insert a subnode at index %d. Count is %d", idx, _subnodes.count];
|
NSString *reason = [NSString stringWithFormat:@"Cannot insert a subnode at index %zd. Count is %zd", idx, _subnodes.count];
|
||||||
@throw [NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo:nil];
|
@throw [NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
- (NSString *)description
|
- (NSString *)description
|
||||||
{
|
{
|
||||||
return [NSString stringWithFormat:@"<%@ : %p image:%@ cropEnabled:%@ opaque:%@ bounds:%@ contentsScale:%.2f backgroundColor:%@ tint:%u contentMode:%@ cropRect:%@>", [self class], self, self.image, @(self.cropEnabled), @(self.opaque), NSStringFromCGRect(self.bounds), self.contentsScale, self.backgroundColor, self.tint, ASDisplayNodeNSStringFromUIContentMode(self.contentMode), NSStringFromCGRect(self.cropRect)];
|
return [NSString stringWithFormat:@"<%@ : %p image:%@ cropEnabled:%@ opaque:%@ bounds:%@ contentsScale:%.2f backgroundColor:%@ tint:%zd contentMode:%@ cropRect:%@>", [self class], self, self.image, @(self.cropEnabled), @(self.opaque), NSStringFromCGRect(self.bounds), self.contentsScale, self.backgroundColor, self.tint, ASDisplayNodeNSStringFromUIContentMode(self.contentMode), NSStringFromCGRect(self.cropRect)];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -119,7 +119,7 @@ NSString *const ASDisplayNodeCAContentsGravityFromUIContentMode(UIViewContentMod
|
|||||||
return UIContentModeCAGravityLUT[i].string;
|
return UIContentModeCAGravityLUT[i].string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ASDisplayNodeCAssert(contentMode == UIViewContentModeRedraw, @"Encountered an unknown contentMode %d. Is this a new version of iOS?", contentMode);
|
ASDisplayNodeCAssert(contentMode == UIViewContentModeRedraw, @"Encountered an unknown contentMode %ld. Is this a new version of iOS?", contentMode);
|
||||||
// Redraw is ok to return nil.
|
// Redraw is ok to return nil.
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,7 +65,7 @@ static UIImage *bogusImage() {
|
|||||||
|
|
||||||
- (NSString *)setContentsCounts
|
- (NSString *)setContentsCounts
|
||||||
{
|
{
|
||||||
return [NSString stringWithFormat:@"syncCount:%u, asyncCount:%u", _setContentsSyncCount, _setContentsAsyncCount];
|
return [NSString stringWithFormat:@"syncCount:%tu, asyncCount:%tu", _setContentsSyncCount, _setContentsAsyncCount];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)checkSetContentsCountsWithSyncCount:(NSUInteger)syncCount asyncCount:(NSUInteger)asyncCount
|
- (BOOL)checkSetContentsCountsWithSyncCount:(NSUInteger)syncCount asyncCount:(NSUInteger)asyncCount
|
||||||
|
|||||||
@ -746,11 +746,11 @@ static inline BOOL _CGPointEqualToPointWithEpsilon(CGPoint point1, CGPoint point
|
|||||||
};
|
};
|
||||||
|
|
||||||
// verify initial
|
// verify initial
|
||||||
XCTAssertTrue(1 == node.retainCount, @"unexpected retain count:%d", node.retainCount);
|
XCTAssertTrue(1 == node.retainCount, @"unexpected retain count:%tu", node.retainCount);
|
||||||
|
|
||||||
// verify increment
|
// verify increment
|
||||||
[node retain];
|
[node retain];
|
||||||
XCTAssertTrue(2 == node.retainCount, @"unexpected retain count:%d", node.retainCount);
|
XCTAssertTrue(2 == node.retainCount, @"unexpected retain count:%tu", node.retainCount);
|
||||||
|
|
||||||
// verify dealloc
|
// verify dealloc
|
||||||
[node release];
|
[node release];
|
||||||
@ -768,15 +768,15 @@ static inline BOOL _CGPointEqualToPointWithEpsilon(CGPoint point1, CGPoint point
|
|||||||
};
|
};
|
||||||
|
|
||||||
// verify initial
|
// verify initial
|
||||||
XCTAssertTrue(1 == node.retainCount, @"unexpected retain count:%d", node.retainCount);
|
XCTAssertTrue(1 == node.retainCount, @"unexpected retain count:%tu", node.retainCount);
|
||||||
|
|
||||||
UIView *v = [[UIView alloc] initWithFrame:CGRectZero];
|
UIView *v = [[UIView alloc] initWithFrame:CGRectZero];
|
||||||
[v addSubview:node.view];
|
[v addSubview:node.view];
|
||||||
|
|
||||||
XCTAssertTrue(2 == node.retainCount, @"view should retain node when added. retain count:%d", node.retainCount);
|
XCTAssertTrue(2 == node.retainCount, @"view should retain node when added. retain count:%tu", node.retainCount);
|
||||||
|
|
||||||
[node release];
|
[node release];
|
||||||
XCTAssertTrue(1 == node.retainCount, @"unexpected retain count:%d", node.retainCount);
|
XCTAssertTrue(1 == node.retainCount, @"unexpected retain count:%tu", node.retainCount);
|
||||||
|
|
||||||
[node.view removeFromSuperview];
|
[node.view removeFromSuperview];
|
||||||
XCTAssertTrue(didDealloc, @"unexpected node lifetime:%@", node);
|
XCTAssertTrue(didDealloc, @"unexpected node lifetime:%@", node);
|
||||||
|
|||||||
@ -93,10 +93,10 @@
|
|||||||
[_renderer size];
|
[_renderer size];
|
||||||
NSRange stringRange = NSMakeRange(0, _attributedString.length);
|
NSRange stringRange = NSMakeRange(0, _attributedString.length);
|
||||||
NSRange visibleRange = [_renderer visibleRange];
|
NSRange visibleRange = [_renderer visibleRange];
|
||||||
XCTAssertTrue(visibleRange.length < stringRange.length, @"Some truncation should occur if the constrained size is smaller than the previously calculated bounding size. String length %d, visible range %@", _attributedString.length, NSStringFromRange(visibleRange));
|
XCTAssertTrue(visibleRange.length < stringRange.length, @"Some truncation should occur if the constrained size is smaller than the previously calculated bounding size. String length %tu, visible range %@", _attributedString.length, NSStringFromRange(visibleRange));
|
||||||
NSRange truncationRange = [_renderer truncationStringCharacterRange];
|
NSRange truncationRange = [_renderer truncationStringCharacterRange];
|
||||||
XCTAssertTrue(truncationRange.location == NSMaxRange(visibleRange), @"Truncation location (%d) should be after the end of the visible range (%d)", truncationRange.location, NSMaxRange(visibleRange));
|
XCTAssertTrue(truncationRange.location == NSMaxRange(visibleRange), @"Truncation location (%zd) should be after the end of the visible range (%zd)", truncationRange.location, NSMaxRange(visibleRange));
|
||||||
XCTAssertTrue(truncationRange.length == _truncationString.length, @"Truncation string length (%d) should be the full length of the supplied truncation string (%@)", truncationRange.length, _truncationString.string);
|
XCTAssertTrue(truncationRange.length == _truncationString.length, @"Truncation string length (%zd) should be the full length of the supplied truncation string (%@)", truncationRange.length, _truncationString.string);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user