diff options
author | ritsuka <[email protected]> | 2013-10-25 18:21:54 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2013-10-25 18:21:54 +0000 |
commit | ef19311ee492b85995da5446d75e2cc0fdb40549 (patch) | |
tree | bd28a616c62f9a9c2eaa5d56f52795279ebf0adc /macosx/HBAdvancedController.m | |
parent | 32a56184a88817091950a94335dbf1036677eaf1 (diff) |
MacGUI: Varius warnings fixes:
- NSUInteger and NSInteger instead of int (where the Cocoa 64bit api uses them).
- Cast to int when needed because NSInteger on 64bit is defined as long.
- NSURL instead of NSString when possible.
- Replaced some deprecated methods/functions.
- numberWithInteger instead of numberWithInt.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5854 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBAdvancedController.m')
-rw-r--r-- | macosx/HBAdvancedController.m | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/macosx/HBAdvancedController.m b/macosx/HBAdvancedController.m index dece0d25f..18ccfe152 100644 --- a/macosx/HBAdvancedController.m +++ b/macosx/HBAdvancedController.m @@ -383,8 +383,8 @@ currentOptsArray = [currentOptString componentsSeparatedByString:@":"]; /*iterate through the array and get <opts> and <values*/ - int loopcounter; - int currentOptsArrayCount = [currentOptsArray count]; + NSUInteger loopcounter; + NSUInteger currentOptsArrayCount = [currentOptsArray count]; for (loopcounter = 0; loopcounter < currentOptsArrayCount; loopcounter++) { thisOpt = [currentOptsArray objectAtIndex:loopcounter]; @@ -701,8 +701,8 @@ currentOptsArray = [currentOptString componentsSeparatedByString:@":"]; /*iterate through the array and get <opts> and <values*/ - int loopcounter; - int currentOptsArrayCount = [currentOptsArray count]; + NSUInteger loopcounter; + NSUInteger currentOptsArrayCount = [currentOptsArray count]; for (loopcounter = 0; loopcounter < currentOptsArrayCount; loopcounter++) { thisOpt = [currentOptsArray objectAtIndex:loopcounter]; @@ -1035,7 +1035,7 @@ { /* Otherwise the format is deblock=a,b, where a and b both have an array offset of 7 because deblocking values start at -6 instead of at zero. */ - thisOpt = [NSString stringWithFormat:@"%@=%d,%d",optName, ([fX264optAlphaDeblockPopUp indexOfSelectedItem] != 0) ? [fX264optAlphaDeblockPopUp indexOfSelectedItem]-7 : 0,([fX264optBetaDeblockPopUp indexOfSelectedItem] != 0) ? [fX264optBetaDeblockPopUp indexOfSelectedItem]-7 : 0]; + thisOpt = [NSString stringWithFormat:@"%@=%ld,%ld",optName, ([fX264optAlphaDeblockPopUp indexOfSelectedItem] != 0) ? [fX264optAlphaDeblockPopUp indexOfSelectedItem]-7 : 0,([fX264optBetaDeblockPopUp indexOfSelectedItem] != 0) ? [fX264optBetaDeblockPopUp indexOfSelectedItem]-7 : 0]; } } @@ -1210,19 +1210,19 @@ /* Motion estimation range uses an odd array offset because in addition to starting with index 0 as default, index 1 starts at 4 instead of 1, because merange can't go below 4. So it has to be handled separately. */ - thisOpt = [NSString stringWithFormat:@"%@=%d",optName,[sender indexOfSelectedItem]+3]; + thisOpt = [NSString stringWithFormat:@"%@=%ld",optName,[sender indexOfSelectedItem]+3]; } else if ([optName isEqualToString:@"b-adapt"]) { /* B-adapt starts at index 0 with default then goes 0, 1, 2)*/ - thisOpt = [NSString stringWithFormat:@"%@=%d", optName, [sender indexOfSelectedItem]-1]; + thisOpt = [NSString stringWithFormat:@"%@=%ld", optName, [sender indexOfSelectedItem]-1]; } else if ([optName isEqualToString:@"ref"]) { /* Refs use actual index numbers */ - thisOpt = [NSString stringWithFormat:@"%@=%d",optName,[sender indexOfSelectedItem]]; + thisOpt = [NSString stringWithFormat:@"%@=%ld",optName,(long)[sender indexOfSelectedItem]]; } else // we have a valid value to change, so change it @@ -1232,7 +1232,7 @@ Basically, any options that are PopUp menus with index 0 as default and index 1 as 0, with numerical values, are all handled right here. All of the above stuff is for the exceptions to the general case. */ - thisOpt = [NSString stringWithFormat:@"%@=%d",optName,[sender indexOfSelectedItem]-1]; + thisOpt = [NSString stringWithFormat:@"%@=%ld",optName,[sender indexOfSelectedItem]-1]; } return thisOpt; @@ -1299,8 +1299,8 @@ currentOptsArray = [currentOptString componentsSeparatedByString:@":"]; /* Iterate through the array and get <opts> and <values*/ - int loopcounter; - int currentOptsArrayCount = [currentOptsArray count]; + NSUInteger loopcounter; + NSUInteger currentOptsArrayCount = [currentOptsArray count]; for (loopcounter = 0; loopcounter < currentOptsArrayCount; loopcounter++) { thisOpt = [currentOptsArray objectAtIndex:loopcounter]; |