From 1cf93f5f74680e22044c6e0051a975770a4b819b Mon Sep 17 00:00:00 2001 From: Rahul Chaudhry Date: Tue, 8 Nov 2016 16:35:22 -0800 Subject: Remove unnecessary uses of reinterpret_cast. Discovered while looking at compiler warnings (b/26936282). Test: WITH_TIDY=1 WITH_STATIC_ANALYZER=1 mma Change-Id: I66f8f6026ed732a504504ade93ff196dc8b727ca --- minui/graphics.cpp | 2 +- minui/resources.cpp | 4 ++-- 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(malloc(font.width * font.height)); - gr_font->texture->data = reinterpret_cast(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(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(surface); + *pSurface = surface; break; } else { int i; -- cgit v1.2.3