diff options
Diffstat (limited to '')
-rw-r--r-- | minui/graphics.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/minui/graphics.cpp b/minui/graphics.cpp index ab56a6fd6..34ea81c7c 100644 --- a/minui/graphics.cpp +++ b/minui/graphics.cpp @@ -14,7 +14,8 @@ * limitations under the License. */ -#include <stdbool.h> +#include "graphics.h" + #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -32,8 +33,7 @@ #include <time.h> #include "font_10x18.h" -#include "minui.h" -#include "graphics.h" +#include "minui/minui.h" static GRFont* gr_font = NULL; static minui_backend* gr_backend = NULL; @@ -298,15 +298,15 @@ 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)); - gr_font->texture->data = reinterpret_cast<unsigned char*>(bits); + unsigned char* bits = static_cast<unsigned char*>(malloc(font.width * font.height)); + gr_font->texture->data = bits; unsigned char data; unsigned char* in = font.rundata; |