Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
fix oclint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
wrmswindmill committed Aug 1, 2019
1 parent 2f2d3a7 commit 18b13b0
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 42 deletions.
2 changes: 0 additions & 2 deletions ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -990,8 +990,6 @@ - (void)executeJsService:(NSString *)script withName:(NSString *)name
NSMutableString *errMsg = [NSMutableString stringWithFormat:@"[WX_KEY_EXCEPTION_INVOKE_JSSERVICE_EXECUTE] name:%@,arg:%@,exception :$@",name,exception];
[WXExceptionUtils commitCriticalExceptionRT:@"WX_KEY_EXCEPTION_INVOKE" errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_INVOKE] function:@"executeJsService" exception:errMsg extParams:nil];
WX_MONITOR_FAIL(WXMTJSService, WX_ERR_JSFRAMEWORK_EXECUTE, errMsg);
} else {
// success
}
}else {
[_jsServiceQueue addObject:@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,7 @@ - (void)prepareLayout
}
} @catch (NSException *exception) {
WXLog(@"%@", exception);
} @finally {
}


currentHeight = [self _maxHeightForAllColumns];
[self _columnsReachToHeight:currentHeight];
}
Expand Down
4 changes: 1 addition & 3 deletions ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm
Original file line number Diff line number Diff line change
Expand Up @@ -674,9 +674,7 @@ - (void)textFiledEditChanged:(NSNotification *)notifi
if (cursorPosition == textField.text.length) {
adjust = newString.length-oldText.length;
}
if (textField.deleteWords &&[textField.editWords isKindOfClass:[NSString class]] && [_recoverRule isEqualToString:textField.editWords]) {
// do nothing
} else {
if (!textField.deleteWords || ![textField.editWords isKindOfClass:[NSString class]] || ![_recoverRule isEqualToString:textField.editWords]) {
textField.text = [newString copy];
UITextPosition * newPosition = [textField positionFromPosition:textField.beginningOfDocument offset:cursorPosition+adjust];
textField.selectedTextRange = [textField textRangeFromPosition:newPosition toPosition:newPosition];
Expand Down
4 changes: 0 additions & 4 deletions ios/sdk/WeexSDK/Sources/Component/WXListComponent.mm
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,6 @@ - (BOOL)_insertSubcomponent:(WXComponent *)subcomponent atIndex:(NSInteger)index
[_tableView endUpdates];
} @catch (NSException *exception) {
WXLogError(@"list insert component occurs exception %@", exception);
} @finally {
// nothing
}

}];
Expand Down Expand Up @@ -656,8 +654,6 @@ - (void)cell:(WXCellComponent *)cell didMoveToIndex:(NSUInteger)index
[_tableView endUpdates];
}@catch(NSException * exception){
WXLogDebug(@"move cell exception: %@", [exception description]);
}@finally {
// do nothing
}
}];
}
Expand Down
4 changes: 0 additions & 4 deletions ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.mm
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,6 @@ - (void)viewDidLoad
if ([scrollView respondsToSelector:@selector(setContentInsetAdjustmentBehavior:)]) {
scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
} else {
// Fallback on earlier versions
}

if (self.ancestorScroller) {
Expand Down Expand Up @@ -935,8 +933,6 @@ - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoi
if( offset.y <= _refreshComponent.calculatedFrame.size.height ) {
[self loadMoreIfNeed];
}
} else if (velocity.y > 0) {
// drop up
}
}

Expand Down
11 changes: 0 additions & 11 deletions ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.m
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ @implementation WXEventManager
- (instancetype) init
{
self = [super init];
if (self) {

}
return self;
}

Expand Down Expand Up @@ -406,8 +403,6 @@ - (void)removeClickEvent
[_tapGesture removeTarget:self action:@selector(onClick:)];
}@catch(NSException *exception) {
WXLog(@"%@", exception);
} @finally {

}
_tapGesture = nil;
}
Expand Down Expand Up @@ -489,8 +484,6 @@ - (void)removeSwipeEvent
}
}@catch(NSException *exception) {
WXLog(@"%@", exception);
}@finally {

}
_swipeGestures = nil;
}
Expand Down Expand Up @@ -552,8 +545,6 @@ - (void)removeLongPressEvent
[_longPressGesture removeTarget:self action:@selector(onLongPress:)];
}@catch(NSException * exception) {
WXLog(@"%@", exception);
}@finally {

}
_longPressGesture = nil;
}
Expand Down Expand Up @@ -712,8 +703,6 @@ - (void)checkRemovePanGesture
[_panGesture removeTarget:self action:@selector(onPan:)];
}@catch(NSException * exception) {
WXLog(@"%@", exception);
}@finally {

}
_panGesture = nil;
}
Expand Down
3 changes: 0 additions & 3 deletions ios/sdk/WeexSDK/Sources/Manager/WXServiceFactory.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ + (instancetype)sharedInstance {

- (instancetype)init
{
if(self = [super init]){

}
return self;
}

Expand Down
1 change: 1 addition & 0 deletions ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ - (void)removeObservers
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
@catch (NSException *exception) {
// avoid empty-catch warning
}
}

Expand Down
1 change: 0 additions & 1 deletion ios/sdk/WeexSDK/Sources/Utility/WXUtility.m
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,6 @@ + (id)load:(NSString *)service {
ret = [NSKeyedUnarchiver unarchiveObjectWithData:(__bridge NSData *)keyData];
} @catch (NSException *e) {
NSLog(@"Unarchive of %@ failed: %@", service, e);
} @finally {
}
}
if (keyData)
Expand Down
4 changes: 2 additions & 2 deletions ios/sdk/WeexSDK/Sources/Utility/WXVersion.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#import "WXVersion.h"
#import "WXDefine.h"

static const char* WeexSDKBuildTime = "2019-07-21 09:08:41 UTC";
static const unsigned long WeexSDKBuildTimestamp = 1563700121;
static const char* WeexSDKBuildTime = "2019-08-01 12:40:11 UTC";
static const unsigned long WeexSDKBuildTimestamp = 1564663211;

NSString* GetWeexSDKVersion(void)
{
Expand Down
14 changes: 5 additions & 9 deletions weex_core/Source/wson/wson_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,23 +230,19 @@ double wson_parser::nextNumber(uint8_t type) {
case WSON_NUMBER_INT_TYPE:{
int32_t num = wson_next_int(wsonBuffer);
return num;
}
break;
}
case WSON_NUMBER_FLOAT_TYPE:{
float num = wson_next_float(wsonBuffer);
return num;
}
break;
}
case WSON_NUMBER_DOUBLE_TYPE:{
double num = wson_next_double(wsonBuffer);
return num;
}
break;
}
case WSON_NUMBER_LONG_TYPE:{
int64_t num = wson_next_long(wsonBuffer);
return num;
}
break;
}
case WSON_BOOLEAN_TYPE_TRUE:
return 1;
case WSON_BOOLEAN_TYPE_FALSE:
Expand Down Expand Up @@ -324,4 +320,4 @@ std::string wson_parser::toStringUTF8() {
std::string json = nextStringUTF8(nextType());
this->wsonBuffer->position = position;
return json;
}
}

0 comments on commit 18b13b0

Please sign in to comment.