diff options
author | Rahul Chaudhry <rahulchaudhry@google.com> | 2016-11-09 01:06:13 +0100 |
---|---|---|
committer | Rahul Chaudhry <rahulchaudhry@google.com> | 2016-11-09 01:34:01 +0100 |
commit | 4f7faac8d705317271e1d6aa773f00f05ca70848 (patch) | |
tree | b1c1b9cd076b26723d7455b3880052250d270ac8 /minui/graphics.cpp | |
parent | Merge "Make make_parent() to take const argument" am: 52e2a97aa7 am: 1fd9f0aff7 am: 260573b3c2 (diff) | |
download | android_bootable_recovery-4f7faac8d705317271e1d6aa773f00f05ca70848.tar android_bootable_recovery-4f7faac8d705317271e1d6aa773f00f05ca70848.tar.gz android_bootable_recovery-4f7faac8d705317271e1d6aa773f00f05ca70848.tar.bz2 android_bootable_recovery-4f7faac8d705317271e1d6aa773f00f05ca70848.tar.lz android_bootable_recovery-4f7faac8d705317271e1d6aa773f00f05ca70848.tar.xz android_bootable_recovery-4f7faac8d705317271e1d6aa773f00f05ca70848.tar.zst android_bootable_recovery-4f7faac8d705317271e1d6aa773f00f05ca70848.zip |
Diffstat (limited to 'minui/graphics.cpp')
-rw-r--r-- | minui/graphics.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/minui/graphics.cpp b/minui/graphics.cpp index ab56a6fd6..d5d8d526e 100644 --- a/minui/graphics.cpp +++ b/minui/graphics.cpp @@ -265,7 +265,7 @@ unsigned int gr_get_height(GRSurface* surface) { } int gr_init_font(const char* name, GRFont** dest) { - GRFont* font = reinterpret_cast<GRFont*>(calloc(1, sizeof(*gr_font))); + GRFont* font = static_cast<GRFont*>(calloc(1, sizeof(*gr_font))); if (font == nullptr) { return -1; } @@ -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(1, sizeof(*gr_font))); + 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; |