summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRahul Chaudhry <rahulchaudhry@google.com>2016-11-16 22:45:03 +0100
committerandroid-build-merger <android-build-merger@google.com>2016-11-16 22:45:03 +0100
commit6a6e54da0448c6d111d1bac64fdf3a744e503f8c (patch)
tree9b8b6868aca953bc91a8abbd9ce1d5ae684d4929
parentMerge "Use static_cast to cast pointers returned by malloc/calloc/realloc/mmap." am: 0bedc8e14c (diff)
parentMerge "Remove unnecessary uses of reinterpret_cast." (diff)
downloadandroid_bootable_recovery-6a6e54da0448c6d111d1bac64fdf3a744e503f8c.tar
android_bootable_recovery-6a6e54da0448c6d111d1bac64fdf3a744e503f8c.tar.gz
android_bootable_recovery-6a6e54da0448c6d111d1bac64fdf3a744e503f8c.tar.bz2
android_bootable_recovery-6a6e54da0448c6d111d1bac64fdf3a744e503f8c.tar.lz
android_bootable_recovery-6a6e54da0448c6d111d1bac64fdf3a744e503f8c.tar.xz
android_bootable_recovery-6a6e54da0448c6d111d1bac64fdf3a744e503f8c.tar.zst
android_bootable_recovery-6a6e54da0448c6d111d1bac64fdf3a744e503f8c.zip
-rw-r--r--minui/graphics.cpp2
-rw-r--r--minui/resources.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/minui/graphics.cpp b/minui/graphics.cpp
index 0680c32bb..dcca3ec41 100644
--- a/minui/graphics.cpp
+++ b/minui/graphics.cpp
@@ -306,7 +306,7 @@ static void gr_init_font(void)
gr_font->texture->pixel_bytes = 1;
unsigned char* bits = static_cast<unsigned char*>(malloc(font.width * font.height));
- gr_font->texture->data = reinterpret_cast<unsigned char*>(bits);
+ gr_font->texture->data = bits;
unsigned char data;
unsigned char* in = font.rundata;
diff --git a/minui/resources.cpp b/minui/resources.cpp
index 34e7b8be3..9ccbf4b1b 100644
--- a/minui/resources.cpp
+++ b/minui/resources.cpp
@@ -308,7 +308,7 @@ int res_create_multi_display_surface(const char* name, int* frames, int* fps,
}
free(p_row);
- *pSurface = reinterpret_cast<GRSurface**>(surface);
+ *pSurface = surface;
exit:
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
@@ -436,7 +436,7 @@ int res_create_localized_alpha_surface(const char* name,
memcpy(surface->data + i*w, row.data(), w);
}
- *pSurface = reinterpret_cast<GRSurface*>(surface);
+ *pSurface = surface;
break;
} else {
int i;