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

Commit

Permalink
Merge pull request #76 from dapenggao/remove-cast
Browse files Browse the repository at this point in the history
Remove cast for `calloc`
  • Loading branch information
Vicc Alexander authored and Vicc Alexander committed Nov 26, 2015
2 parents 74a886b + 9ffbe79 commit 45ee583
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Pod/Classes/Objective-C/UIColor+ChameleonPrivate.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ + (UIColor *)colorFromImage:(UIImage *)image atPoint:(CGPoint)point {
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();

//Extract the data we need
unsigned char *rawData = (unsigned char *) calloc(height * width * 4, sizeof(unsigned char));
unsigned char *rawData = calloc(height * width * 4, sizeof(unsigned char));
NSUInteger bytesPerPixel = 4;
NSUInteger bytesPerRow = bytesPerPixel * width;
NSUInteger bitsPerComponent = 8;
Expand Down
2 changes: 1 addition & 1 deletion Pod/Classes/Objective-C/UIImage+ChameleonPrivate.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ + (UIColor *)colorFromImage:(UIImage *)image atPoint:(CGPoint)point {
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();

//Extract the data we need
unsigned char *rawData = (unsigned char *) calloc(height * width * 4, sizeof(unsigned char));
unsigned char *rawData = calloc(height * width * 4, sizeof(unsigned char));
NSUInteger bytesPerPixel = 4;
NSUInteger bytesPerRow = bytesPerPixel * width;
NSUInteger bitsPerComponent = 8;
Expand Down

0 comments on commit 45ee583

Please sign in to comment.