mirror of
https://github.com/zxing/zxing.git
synced 2025-01-27 11:01:00 -08:00
[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:
parent
3e00ecd283
commit
b54780cc5b
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue