Quellcode durchsuchen

1.修改Apex Mobile警告。

Pen Li vor 8 Jahren
Ursprung
Commit
693f84ae5d
1 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
  1. 5 5
      RedAnt ERP Mobile/common/RAUtils.m

+ 5 - 5
RedAnt ERP Mobile/common/RAUtils.m

@@ -172,9 +172,9 @@
 
 +(NSTextCheckingResult*) expression_findfistMatch:(NSString*)content regex:(NSString*) pattern
 {
-    NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:nil error:nil];
+    NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:0 error:nil];
     
-    NSTextCheckingResult *match = [regex firstMatchInString:content options:nil range:NSMakeRange(0, content.length)];
+    NSTextCheckingResult *match = [regex firstMatchInString:content options:0 range:NSMakeRange(0, content.length)];
     return match;
 //    if (matches) {
 //        for (NSTextCheckingResult *match in matches) {
@@ -192,9 +192,9 @@
         return nil;
 
     
-    NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:nil error:nil];
+    NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:0 error:nil];
     
-    NSArray *matches = [regex matchesInString:content options:nil range:NSMakeRange(0, content.length)];
+    NSArray *matches = [regex matchesInString:content options:0 range:NSMakeRange(0, content.length)];
     
     if (matches) {
         for (NSTextCheckingResult *match in matches) {
@@ -414,7 +414,7 @@
     if(error==nil)
         return nil;
     NSMutableDictionary* ret = [[NSMutableDictionary alloc] init];
-    [ret setValue:[NSString stringWithFormat:@"%d",error.code] forKey:@"error_code"];
+    [ret setValue:[NSString stringWithFormat:@"%ld",error.code] forKey:@"error_code"];
     [ret setValue:error.domain forKey:@"err_domain"];
     [ret setValue:[error localizedDescription] forKey:@"err_message"];
     // [ret setObject:error.userInfo forKey:@"user_info"];