[iphone/ZXingWidget] minor changes. Some syntax changed to make the code build with clang

git-svn-id: https://zxing.googlecode.com/svn/trunk@1690 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
rpechayr 2010-12-22 17:33:00 +00:00
parent 3e00ecd283
commit b54780cc5b
9 changed files with 15 additions and 14 deletions

View file

@ -32,7 +32,8 @@ static const CGFloat kPadding = 10;
////////////////////////////////////////////////////////////////////////////////////////////////////
- (id) initWithFrame:(CGRect)theFrame cancelEnabled:(BOOL)isCancelEnabled oneDMode:(BOOL)isOneDModeEnabled {
if( self = [super initWithFrame:theFrame] ) {
self = [super initWithFrame:theFrame];
if( self ) {
CGFloat rectSize = self.frame.size.width - kPadding * 2;
if (!oneDMode) {

View file

@ -52,7 +52,8 @@
- (id)initWithDelegate:(id<ZXingDelegate>)scanDelegate showCancel:(BOOL)shouldShowCancel OneDMode:(BOOL)shouldUseoOneDMode {
if (self = [super init]) {
self = [super init];
if (self) {
[self setDelegate:scanDelegate];
self.oneDMode = shouldUseoOneDMode;
self.showCancel = shouldShowCancel;
@ -112,7 +113,6 @@
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.wantsFullScreenLayout = YES;
//[[UIApplication sharedApplication] setStatusBarHidden:YES];
if ([self soundToPlay] != nil) {
OSStatus error = AudioServicesCreateSystemSoundID((CFURLRef)[self soundToPlay], &beepSound);
if (error != kAudioServicesNoError) {
@ -124,14 +124,11 @@
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[[UIApplication sharedApplication] setStatusBarHidden:YES];
//self.wantsFullScreenLayout = YES;
decoding = YES;
[self initCapture];
[self.view addSubview:overlayView];
// [self loadImagePicker];
// self.view = imagePicker.view;
[overlayView setPoints:nil];
wasCancelled = NO;

View file

@ -33,7 +33,7 @@
+ (ParsedResult *)parsedResultForString:(NSString *)s {
NSRange prefixRange = [s rangeOfString:PREFIX options:NSCaseInsensitiveSearch];
if (prefixRange.location == 0) {
int restStart = prefixRange.location + prefixRange.length;
int restStart = /*prefixRange.location + */ prefixRange.length;
return [[[GeoParsedResult alloc] initWithLocation:[s substringFromIndex:restStart]]
autorelease];
}

View file

@ -34,7 +34,7 @@
NSRange prefixRange = [s rangeOfString:PREFIX options:NSCaseInsensitiveSearch];
if (prefixRange.location == 0) {
int max = [s length];
int restStart = prefixRange.location + prefixRange.length;
int restStart = /*prefixRange.location + */ prefixRange.length;
// initial presuption: everything after the prefix is the number, and there is no body
NSRange numberRange = NSMakeRange(restStart, max - restStart);

View file

@ -34,7 +34,7 @@
NSRange prefixRange = [s rangeOfString:PREFIX options:NSCaseInsensitiveSearch];
if (prefixRange.location == 0) {
int max = [s length];
int restStart = prefixRange.location + prefixRange.length;
int restStart = /*prefixRange.location + */ prefixRange.length;
NSRange searchRange = NSMakeRange(restStart, max - restStart);
NSRange colonRange = [s rangeOfString:@":" options:0 range:searchRange];
if (colonRange.location != NSNotFound) {

View file

@ -33,7 +33,7 @@
+ (ParsedResult *)parsedResultForString:(NSString *)s {
NSRange telRange = [s rangeOfString:PREFIX options:NSCaseInsensitiveSearch];
if (telRange.location == 0) {
int restStart = telRange.location + telRange.length;
int restStart = /*telRange.location + */ telRange.length;
return [[[TelParsedResult alloc] initWithNumber:[s substringFromIndex:restStart]]
autorelease];
}

View file

@ -60,7 +60,7 @@
+ (ParsedResult *)parsedResultForString:(NSString *)s {
NSRange prefixRange = [s rangeOfString:PREFIX options:NSCaseInsensitiveSearch];
if (prefixRange.location == 0) {
int restStart = prefixRange.location + prefixRange.length;
int restStart = /*prefixRange.location + */ prefixRange.length;
return [[[URIParsedResult alloc] initWithURLString:[[s substringFromIndex:restStart] massagedURLString]]
autorelease];
}

View file

@ -34,7 +34,7 @@
NSRange prefixRange = [s rangeOfString:PREFIX options:NSCaseInsensitiveSearch];
if (prefixRange.location == 0) {
int max = [s length];
int titleStart = prefixRange.location + prefixRange.length;
int titleStart = /*prefixRange.location + */ prefixRange.length;
NSRange searchRange = NSMakeRange(titleStart, max - titleStart);
NSRange colonRange = [s rangeOfString:@":" options:0 range:searchRange];
if (colonRange.location != NSNotFound) {

View file

@ -1205,9 +1205,11 @@
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_VERSION = "";
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = ../../cpp/core/src;
"HEADER_SEARCH_PATHS[arch=*]" = "";
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
OTHER_LDFLAGS = "-ObjC";
PREBINDING = NO;
@ -1221,9 +1223,10 @@
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_VERSION = "";
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = ../../cpp/core/src;
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
OTHER_LDFLAGS = "-ObjC";
PREBINDING = NO;