fix some warnings and notes

This commit is contained in:
Sami Samhuri 2014-03-30 23:00:59 -07:00
parent d3436be10a
commit f28626d097
3 changed files with 6 additions and 6 deletions

View file

@ -278,7 +278,7 @@ NSString *JoinURLComponents(NSString *first, va_list args)
if (_baseURL && !([url hasPrefix: @"http:"] || [url hasPrefix: @"https:"])) {
[mutableOptions setObject: [self urlWithPath: url] forKey: @"url"];
}
NSUInteger timeout = [[options objectForKey: @"timeout"] unsignedIntValue];
NSUInteger timeout = [[options objectForKey: @"timeout"] unsignedLongValue];
if (timeout == 0) {
[mutableOptions setValue: [NSNumber numberWithUnsignedLong: self.timeout] forKey: @"timeout"];
}

View file

@ -30,10 +30,10 @@ NSString* URLEncode(NSString *string) {
{
NSRegularExpression *regex = [NSRegularExpression
regularExpressionWithPattern: pattern
options: 0
options: NSMatchingReportCompletion
error: NULL];
NSRange match = [regex rangeOfFirstMatchInString: self
options: NSMatchingCompleted
options: NSMatchingReportCompletion
range: NSMakeRange(0, self.length)];
return match.location == NSNotFound ? nil : [self substringWithRange: match];
}
@ -45,7 +45,7 @@ NSString* URLEncode(NSString *string) {
options: NSRegularExpressionCaseInsensitive
error: NULL];
return [regex stringByReplacingMatchesInString: self
options: NSMatchingCompleted
options: NSMatchingReportCompletion
range: NSMakeRange(0, [self length])
withTemplate: @""];
}
@ -54,7 +54,7 @@ NSString* URLEncode(NSString *string) {
{
NSRegularExpression *regex = [NSRegularExpression
regularExpressionWithPattern: pattern
options: 0
options: NSMatchingReportCompletion
error: NULL];
NSRange match = [regex rangeOfFirstMatchInString: self
options: NSMatchingCompleted

View file

@ -9,7 +9,7 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef void (^UIAlertViewCallback)(long buttonClicked, BOOL canceled);
typedef void (^UIAlertViewCallback)(NSInteger buttonClicked, BOOL canceled);
@interface UIAlertViewDelegate : NSObject <UIAlertViewDelegate>
{