summaryrefslogtreecommitdiffstats
path: root/minui/resources.cpp
diff options
context:
space:
mode:
authorRahul Chaudhry <rahulchaudhry@google.com>2016-11-09 01:06:13 +0100
committerRahul Chaudhry <rahulchaudhry@google.com>2016-11-09 01:34:01 +0100
commit4f7faac8d705317271e1d6aa773f00f05ca70848 (patch)
treeb1c1b9cd076b26723d7455b3880052250d270ac8 /minui/resources.cpp
parentMerge "Make make_parent() to take const argument" am: 52e2a97aa7 am: 1fd9f0aff7 am: 260573b3c2 (diff)
downloadandroid_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/resources.cpp')
-rw-r--r--minui/resources.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/minui/resources.cpp b/minui/resources.cpp
index 730b05f13..c723476cc 100644
--- a/minui/resources.cpp
+++ b/minui/resources.cpp
@@ -37,7 +37,7 @@
static GRSurface* malloc_surface(size_t data_size) {
size_t size = sizeof(GRSurface) + data_size + SURFACE_DATA_ALIGNMENT;
- unsigned char* temp = reinterpret_cast<unsigned char*>(malloc(size));
+ unsigned char* temp = static_cast<unsigned char*>(malloc(size));
if (temp == NULL) return NULL;
GRSurface* surface = reinterpret_cast<GRSurface*>(temp);
surface->data = temp + sizeof(GRSurface) +
@@ -221,7 +221,7 @@ int res_create_display_surface(const char* name, GRSurface** pSurface) {
png_set_bgr(png_ptr);
#endif
- p_row = reinterpret_cast<unsigned char*>(malloc(width * 4));
+ p_row = static_cast<unsigned char*>(malloc(width * 4));
for (y = 0; y < height; ++y) {
png_read_row(png_ptr, p_row, NULL);
transform_rgb_to_draw(p_row, surface->data + y * surface->row_bytes, channels, width);
@@ -281,7 +281,7 @@ int res_create_multi_display_surface(const char* name, int* frames, int* fps,
goto exit;
}
- surface = reinterpret_cast<GRSurface**>(calloc(*frames, sizeof(GRSurface*)));
+ surface = static_cast<GRSurface**>(calloc(*frames, sizeof(GRSurface*)));
if (surface == NULL) {
result = -8;
goto exit;
@@ -298,7 +298,7 @@ int res_create_multi_display_surface(const char* name, int* frames, int* fps,
png_set_bgr(png_ptr);
#endif
- p_row = reinterpret_cast<unsigned char*>(malloc(width * 4));
+ p_row = static_cast<unsigned char*>(malloc(width * 4));
for (y = 0; y < height; ++y) {
png_read_row(png_ptr, p_row, NULL);
int frame = y % *frames;