Skip to content

Commit

Permalink
Merge pull request #9 from AdamBCo/patch-1
Browse files Browse the repository at this point in the history
Fixes "Implicit conversion loses integer precision" warnings
  • Loading branch information
AlvaroFranco committed Feb 13, 2015
2 parents b6bfd7b + c155a64 commit ff31137
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/UIImage+ImageEffects.m
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ - (UIImage *)applyTintEffectWithColor:(UIColor *)tintColor
{
const CGFloat EffectColorAlpha = 0.6;
UIColor *effectColor = tintColor;
int componentCount = CGColorGetNumberOfComponents(tintColor.CGColor);
NSInteger componentCount = CGColorGetNumberOfComponents(tintColor.CGColor);
if (componentCount == 2) {
CGFloat b;
if ([tintColor getWhite:&b alpha:NULL]) {
Expand Down Expand Up @@ -200,7 +200,7 @@ - (UIImage *)applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintCo
// ... if d is odd, use three box-blurs of size 'd', centered on the output pixel.
//
CGFloat inputRadius = blurRadius * [[UIScreen mainScreen] scale];
NSUInteger radius = floor(inputRadius * 3. * sqrt(2 * M_PI) / 4 + 0.5);
int radius = floor(inputRadius * 3. * sqrt(2 * M_PI) / 4 + 0.5);
if (radius % 2 != 1) {
radius += 1; // force radius to be odd so that the three box-blur methodology works.
}
Expand Down

0 comments on commit ff31137

Please sign in to comment.