summaryrefslogtreecommitdiffstats
path: root/minui/graphics.cpp
diff options
context:
space:
mode:
authorRahul Chaudhry <rahulchaudhry@google.com>2016-11-09 22:17:01 +0100
committerTao Bao <tbao@google.com>2016-11-16 08:24:54 +0100
commitb29f23f7e7c791e7d8786de93d630a12e4250c71 (patch)
tree7c5ac472f60ca965c98eb2cf547f8685bcdd3101 /minui/graphics.cpp
parentMerge "updater: Fix the wrong return value for package_extract_file()." (diff)
downloadandroid_bootable_recovery-b29f23f7e7c791e7d8786de93d630a12e4250c71.tar
android_bootable_recovery-b29f23f7e7c791e7d8786de93d630a12e4250c71.tar.gz
android_bootable_recovery-b29f23f7e7c791e7d8786de93d630a12e4250c71.tar.bz2
android_bootable_recovery-b29f23f7e7c791e7d8786de93d630a12e4250c71.tar.lz
android_bootable_recovery-b29f23f7e7c791e7d8786de93d630a12e4250c71.tar.xz
android_bootable_recovery-b29f23f7e7c791e7d8786de93d630a12e4250c71.tar.zst
android_bootable_recovery-b29f23f7e7c791e7d8786de93d630a12e4250c71.zip
Diffstat (limited to 'minui/graphics.cpp')
-rw-r--r--minui/graphics.cpp6
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;