Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoid analyser warnings about switch cases not handled

Method -[UIColor colorUsingColorSpaceModel:] answers nil by default.
  • Loading branch information...
commit a183fb0da6808a3d9c41428f555baeb3267361b7 1 parent 221dda4
@royratcliffe authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 UIColor+RRUIKit.m
View
9 UIColor+RRUIKit.m
@@ -45,7 +45,10 @@ - (UIColor *)colorUsingColorSpaceModel:(CGColorSpaceModel)model
CGFloat components[[self numberOfComponents]];
[self getComponents:components];
color = [UIColor colorWithRed:components[0] green:components[0] blue:components[0] alpha:components[1]];
+ break;
}
+ default:
+ ;
}
break;
case kCGColorSpaceModelRGB:
@@ -54,7 +57,13 @@ - (UIColor *)colorUsingColorSpaceModel:(CGColorSpaceModel)model
case kCGColorSpaceModelRGB:
// RGB --> RGB
color = self;
+ break;
+ default:
+ ;
}
+ break;
+ default:
+ ;
}
return color;
}
Please sign in to comment.
Something went wrong with that request. Please try again.