diff options
author | Tao Bao <tbao@google.com> | 2016-11-16 19:17:37 +0100 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-11-16 19:17:37 +0100 |
commit | 0c15140dad24f73226e018d35d405b15b8f5932d (patch) | |
tree | 3acc78a6fc526da3f343b95918cb2cfe86bd9a8b /minui/graphics.cpp | |
parent | resolve merge conflicts of 4f86f26 to stage-aosp-master (diff) | |
parent | Merge "Use static_cast to cast pointers returned by malloc/calloc/realloc/mmap." (diff) | |
download | android_bootable_recovery-0c15140dad24f73226e018d35d405b15b8f5932d.tar android_bootable_recovery-0c15140dad24f73226e018d35d405b15b8f5932d.tar.gz android_bootable_recovery-0c15140dad24f73226e018d35d405b15b8f5932d.tar.bz2 android_bootable_recovery-0c15140dad24f73226e018d35d405b15b8f5932d.tar.lz android_bootable_recovery-0c15140dad24f73226e018d35d405b15b8f5932d.tar.xz android_bootable_recovery-0c15140dad24f73226e018d35d405b15b8f5932d.tar.zst android_bootable_recovery-0c15140dad24f73226e018d35d405b15b8f5932d.zip |
Diffstat (limited to '')
-rw-r--r-- | minui/graphics.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/minui/graphics.cpp b/minui/graphics.cpp index ab56a6fd6..0680c32bb 100644 --- a/minui/graphics.cpp +++ b/minui/graphics.cpp @@ -298,14 +298,14 @@ static void gr_init_font(void) // fall back to the compiled-in font. - gr_font = reinterpret_cast<GRFont*>(calloc(1, sizeof(*gr_font))); - gr_font->texture = reinterpret_cast<GRSurface*>(malloc(sizeof(*gr_font->texture))); + gr_font = static_cast<GRFont*>(calloc(sizeof(*gr_font), 1)); + gr_font->texture = static_cast<GRSurface*>(malloc(sizeof(*gr_font->texture))); gr_font->texture->width = font.width; gr_font->texture->height = font.height; gr_font->texture->row_bytes = font.width; gr_font->texture->pixel_bytes = 1; - unsigned char* bits = reinterpret_cast<unsigned char*>(malloc(font.width * font.height)); + unsigned char* bits = static_cast<unsigned char*>(malloc(font.width * font.height)); gr_font->texture->data = reinterpret_cast<unsigned char*>(bits); unsigned char data; |