summaryrefslogtreecommitdiff
path: root/platform/darwin
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-11-23 13:37:00 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-11-23 17:28:44 -0800
commit36081f6486201d9bd316f3a8ceb5a38ad2e97310 (patch)
tree58797124ca97462a455c42314d0235ff6df33d11 /platform/darwin
parenta620912176c066181c0cc81e41c9205cc2a0d9c0 (diff)
downloadqtlocation-mapboxgl-36081f6486201d9bd316f3a8ceb5a38ad2e97310.tar.gz
[core] For binary image data use uint8_t, not char
Diffstat (limited to 'platform/darwin')
-rw-r--r--platform/darwin/image.mm4
1 files changed, 2 insertions, 2 deletions
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<CGFloat>(width), static_cast<CGFloat>(height) }};
- img = std::make_unique<char[]>(width * height * 4);
+ img = std::make_unique<uint8_t[]>(width * height * 4);
CGContextRef context = CGBitmapContextCreate(img.get(), width, height, 8, width * 4,
color_space, kCGImageAlphaPremultipliedLast);
if (!context) {