From f28626d097be7c316890de5214ef4ec601ae3f2f Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sun, 30 Mar 2014 23:00:59 -0700 Subject: [PATCH] fix some warnings and notes --- Marshmallows/MMHTTPClient.m | 2 +- Marshmallows/NSString+marshmallows.m | 8 ++++---- Marshmallows/UIAlertViewDelegate.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Marshmallows/MMHTTPClient.m b/Marshmallows/MMHTTPClient.m index 3064ba7..677f100 100644 --- a/Marshmallows/MMHTTPClient.m +++ b/Marshmallows/MMHTTPClient.m @@ -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"]; } diff --git a/Marshmallows/NSString+marshmallows.m b/Marshmallows/NSString+marshmallows.m index 871a42f..47551c5 100644 --- a/Marshmallows/NSString+marshmallows.m +++ b/Marshmallows/NSString+marshmallows.m @@ -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 diff --git a/Marshmallows/UIAlertViewDelegate.h b/Marshmallows/UIAlertViewDelegate.h index 3df186f..5185d5b 100644 --- a/Marshmallows/UIAlertViewDelegate.h +++ b/Marshmallows/UIAlertViewDelegate.h @@ -9,7 +9,7 @@ #import #import -typedef void (^UIAlertViewCallback)(long buttonClicked, BOOL canceled); +typedef void (^UIAlertViewCallback)(NSInteger buttonClicked, BOOL canceled); @interface UIAlertViewDelegate : NSObject {