From 36081f6486201d9bd316f3a8ceb5a38ad2e97310 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 23 Nov 2015 13:37:00 -0800 Subject: [core] For binary image data use uint8_t, not char --- platform/darwin/image.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'platform/darwin') diff --git a/platform/darwin/image.mm b/platform/darwin/image.mm index 31373e9d15..8965f1ea93 100644 --- a/platform/darwin/image.mm +++ b/platform/darwin/image.mm @@ -11,7 +11,7 @@ namespace mbgl { namespace util { -std::string compress_png(int width, int height, const void *rgba) { +std::string compress_png(size_t width, size_t height, const uint8_t* rgba) { CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, rgba, width * height * 4, NULL); if (!provider) { return ""; @@ -97,7 +97,7 @@ Image::Image(const std::string &source_data) { height = uint32_t(CGImageGetHeight(image)); CGRect rect = {{ 0, 0 }, { static_cast(width), static_cast(height) }}; - img = std::make_unique(width * height * 4); + img = std::make_unique(width * height * 4); CGContextRef context = CGBitmapContextCreate(img.get(), width, height, 8, width * 4, color_space, kCGImageAlphaPremultipliedLast); if (!context) { -- cgit v1.2.1