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

Commit

Permalink
fix remaining oclint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
wrmswindmill committed Aug 8, 2019
1 parent ceef453 commit b02199e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
22 changes: 11 additions & 11 deletions ios/sdk/WeexSDK/Sources/Component/WXTextComponent.mm
Original file line number Diff line number Diff line change
Expand Up @@ -246,17 +246,17 @@ - (void)dealloc

- (void)fillCSSStyles:(NSDictionary *)styles
{
WX_STYLE_FILL_TEXT(fontFamily, fontFamily, NSString, YES)
WX_STYLE_FILL_TEXT_PIXEL(fontSize, fontSize, YES)
WX_STYLE_FILL_TEXT(fontWeight, fontWeight, WXTextWeight, YES)
WX_STYLE_FILL_TEXT(fontStyle, fontStyle, WXTextStyle, YES)
WX_STYLE_FILL_TEXT(lines, lines, NSUInteger, YES)
WX_STYLE_FILL_TEXT(textAlign, textAlign, NSTextAlignment, NO)
WX_STYLE_FILL_TEXT(textDecoration, textDecoration, WXTextDecoration, YES)
WX_STYLE_FILL_TEXT(textOverflow, textOverflow, NSString, NO)
WX_STYLE_FILL_TEXT_PIXEL(lineHeight, lineHeight, YES)
WX_STYLE_FILL_TEXT_PIXEL(letterSpacing, letterSpacing, YES)
WX_STYLE_FILL_TEXT(wordWrap, wordWrap, NSString, YES);
WX_STYLE_FILL_TEXT(fontFamily, fontFamily, NSString, YES) //!OCLint
WX_STYLE_FILL_TEXT_PIXEL(fontSize, fontSize, YES) //!OCLint
WX_STYLE_FILL_TEXT(fontWeight, fontWeight, WXTextWeight, YES) //!OCLint
WX_STYLE_FILL_TEXT(fontStyle, fontStyle, WXTextStyle, YES) //!OCLint
WX_STYLE_FILL_TEXT(lines, lines, NSUInteger, YES) //!OCLint
WX_STYLE_FILL_TEXT(textAlign, textAlign, NSTextAlignment, NO) //!OCLint
WX_STYLE_FILL_TEXT(textDecoration, textDecoration, WXTextDecoration, YES) //!OCLint
WX_STYLE_FILL_TEXT(textOverflow, textOverflow, NSString, NO) //!OCLint
WX_STYLE_FILL_TEXT_PIXEL(lineHeight, lineHeight, YES) //!OCLint
WX_STYLE_FILL_TEXT_PIXEL(letterSpacing, letterSpacing, YES) //!OCLint
WX_STYLE_FILL_TEXT(wordWrap, wordWrap, NSString, YES); //!OCLint

UIColor* color = nil;
id value = styles[@"color"];
Expand Down
4 changes: 2 additions & 2 deletions ios/sdk/WeexSDK/Sources/Display/UIBezierPath+Weex.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ + (instancetype)wx_bezierPathWithRoundedRect:(CGRect)rect
bottomRight:(CGFloat)bottomRightRadius
{
UIBezierPath *path = [UIBezierPath bezierPath];
if(isnan(topLeftRadius) || isnan(topRightRadius) || isnan(bottomLeftRadius) || isnan(bottomRightRadius)) {
if(isnan(topLeftRadius) || isnan(topRightRadius) || isnan(bottomLeftRadius) || isnan(bottomRightRadius)) { //!OCLint
return path;
}
if (![WXUtility isValidPoint:rect.origin] || isnan(rect.size.height) || isnan(rect.size.width)) {
if (![WXUtility isValidPoint:rect.origin] || isnan(rect.size.height) || isnan(rect.size.width)) { //!OCLint
return path;
}
CGPoint topLeftPoint = CGPointMake(rect.origin.x + topLeftRadius, rect.origin.y);
Expand Down
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Utility/WXUtility.m
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ + (BOOL)isBlankString:(NSString *)string {

+ (BOOL)isValidPoint:(CGPoint)point
{
return !(isnan(point.x)) && !(isnan(point.y));
return !(isnan(point.x)) && !(isnan(point.y)); //!OCLint
}

+ (NSError *)errorWithCode:(NSInteger)code message:(NSString *)message
Expand Down
2 changes: 1 addition & 1 deletion weex_core/Source/core/render/manager/render_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ void RenderManager::CallMetaModule(const char *page_id, const char *method, cons
else if (key == "deviceWidth") {
setPageArgument(page_id, "devicewidth", value);
}
else if (key == "deviceHeight") {
else if (key == "deviceHeight") { //!OCLint
// unsupported now
}
else if (key == "reserveCssStyles") {
Expand Down
2 changes: 1 addition & 1 deletion weex_core/Source/wson/wson_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void wson_parser::toJSONtring(std::string &builder){

std::string wson_parser::nextStringUTF8(uint8_t type) {
std::string str;
switch (type) {
switch (type) {//!OCLint
case WSON_UINT8_STRING_TYPE: {
int size = wson_next_uint(wsonBuffer);
uint8_t *utf8 = wson_next_bts(wsonBuffer, size);
Expand Down

0 comments on commit b02199e

Please sign in to comment.