mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-28 02:45:58 +00:00
Fix several small type comparison issues
This commit is contained in:
parent
2999f621d2
commit
a006862a61
@ -61,7 +61,7 @@ FOUNDATION_EXPORT char *BITSafeJsonEventsString;
|
|||||||
/**
|
/**
|
||||||
* Number of queue items which will trigger a flush (testing).
|
* Number of queue items which will trigger a flush (testing).
|
||||||
*/
|
*/
|
||||||
@property (nonatomic) NSInteger maxBatchCount;
|
@property (nonatomic) NSUInteger maxBatchCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A queue which makes array operations thread safe.
|
* A queue which makes array operations thread safe.
|
||||||
|
|||||||
@ -182,7 +182,7 @@ void bit_resetSafeJsonStream(char **string) {
|
|||||||
|
|
||||||
#pragma mark - Batching
|
#pragma mark - Batching
|
||||||
|
|
||||||
- (NSInteger)maxBatchCount {
|
- (NSUInteger)maxBatchCount {
|
||||||
if(_maxBatchCount <= 0){
|
if(_maxBatchCount <= 0){
|
||||||
return defaultMaxBatchCount;
|
return defaultMaxBatchCount;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -581,7 +581,7 @@ static const char *findSEL (const char *imageName, NSString *imageUUID, uint64_t
|
|||||||
#endif
|
#endif
|
||||||
[text appendFormat: fmt,
|
[text appendFormat: fmt,
|
||||||
imageInfo.imageBaseAddress,
|
imageInfo.imageBaseAddress,
|
||||||
imageInfo.imageBaseAddress + (MAX(1, imageInfo.imageSize) - 1), // The Apple format uses an inclusive range
|
imageInfo.imageBaseAddress + (MAX(1U, imageInfo.imageSize) - 1), // The Apple format uses an inclusive range
|
||||||
binaryDesignator,
|
binaryDesignator,
|
||||||
[imageInfo.imageName lastPathComponent],
|
[imageInfo.imageName lastPathComponent],
|
||||||
archName,
|
archName,
|
||||||
@ -809,7 +809,7 @@ static const char *findSEL (const char *imageName, NSString *imageUUID, uint64_t
|
|||||||
|
|
||||||
/* Make sure UTF8/16 characters are handled correctly */
|
/* Make sure UTF8/16 characters are handled correctly */
|
||||||
NSInteger offset = 0;
|
NSInteger offset = 0;
|
||||||
NSInteger index = 0;
|
NSUInteger index = 0;
|
||||||
for (index = 0; index < [imageName length]; index++) {
|
for (index = 0; index < [imageName length]; index++) {
|
||||||
NSRange range = [imageName rangeOfComposedCharacterSequenceAtIndex:index];
|
NSRange range = [imageName rangeOfComposedCharacterSequenceAtIndex:index];
|
||||||
if (range.length > 1) {
|
if (range.length > 1) {
|
||||||
|
|||||||
@ -359,7 +359,7 @@
|
|||||||
|
|
||||||
- (void)imageButtonPressed:(id)sender {
|
- (void)imageButtonPressed:(id)sender {
|
||||||
if ([self.delegate respondsToSelector:@selector(listCell:didSelectAttachment:)]) {
|
if ([self.delegate respondsToSelector:@selector(listCell:didSelectAttachment:)]) {
|
||||||
NSInteger index = [self.attachmentViews indexOfObject:sender];
|
NSUInteger index = [self.attachmentViews indexOfObject:sender];
|
||||||
if (index != NSNotFound && [self.message previewableAttachments].count > index) {
|
if (index != NSNotFound && [self.message previewableAttachments].count > index) {
|
||||||
BITFeedbackMessageAttachment *attachment = [self.message previewableAttachments][index];
|
BITFeedbackMessageAttachment *attachment = [self.message previewableAttachments][index];
|
||||||
[self.delegate listCell:self didSelectAttachment:attachment];
|
[self.delegate listCell:self didSelectAttachment:attachment];
|
||||||
|
|||||||
@ -956,7 +956,7 @@
|
|||||||
self.cachedPreviewItems = nil;
|
self.cachedPreviewItems = nil;
|
||||||
NSMutableArray *collectedAttachments = [NSMutableArray new];
|
NSMutableArray *collectedAttachments = [NSMutableArray new];
|
||||||
|
|
||||||
for (int i = 0; i < self.manager.numberOfMessages; i++) {
|
for (uint i = 0; i < self.manager.numberOfMessages; i++) {
|
||||||
BITFeedbackMessage *message = [self.manager messageAtIndex:i];
|
BITFeedbackMessage *message = [self.manager messageAtIndex:i];
|
||||||
[collectedAttachments addObjectsFromArray:message.previewableAttachments];
|
[collectedAttachments addObjectsFromArray:message.previewableAttachments];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -301,7 +301,7 @@ typedef NS_ENUM(NSInteger, BITImageAnnotationViewControllerInteractionMode) {
|
|||||||
BITImageAnnotation *candidate = nil;
|
BITImageAnnotation *candidate = nil;
|
||||||
BOOL validView = YES;
|
BOOL validView = YES;
|
||||||
|
|
||||||
for ( int i = 0; i<gestureRecognizer.numberOfTouches; i++){
|
for (uint i = 0; i<gestureRecognizer.numberOfTouches; i++){
|
||||||
BITImageAnnotation *newCandidate = (BITImageAnnotation *)[self.view hitTest:[gestureRecognizer locationOfTouch:i inView:self.view] withEvent:nil];
|
BITImageAnnotation *newCandidate = (BITImageAnnotation *)[self.view hitTest:[gestureRecognizer locationOfTouch:i inView:self.view] withEvent:nil];
|
||||||
|
|
||||||
if (![newCandidate isKindOfClass:[BITImageAnnotation class]]){
|
if (![newCandidate isKindOfClass:[BITImageAnnotation class]]){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user