From 21d5ba34b0c1cda1b1fa20c620c5cfed96750af9 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 27 Jun 2019 18:01:55 +0000 Subject: [PATCH] Shut up some Clang warnings in the Enhanced branch Once again SDL2 using plain ints everywhere causes issues. --- src/Draw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Draw.cpp b/src/Draw.cpp index 602b71fb..36feedbc 100644 --- a/src/Draw.cpp +++ b/src/Draw.cpp @@ -388,7 +388,7 @@ BOOL ReloadBitmap_Resource(const char *res, Surface_Ids surf_no) static SDL_Rect RectToSDLRect(RECT *rect) { - SDL_Rect SDLRect = {rect->left, rect->top, rect->right - rect->left, rect->bottom - rect->top}; + SDL_Rect SDLRect = {(int)rect->left, (int)rect->top, (int)(rect->right - rect->left), (int)(rect->bottom - rect->top)}; if (SDLRect.w < 0) SDLRect.w = 0; if (SDLRect.h < 0) @@ -468,7 +468,7 @@ void PutBitmap4(RECT *rcView, int x, int y, RECT *rect, Surface_Ids surf_no) // void Surface2Surface(int x, int y, RECT *rect, int to, int from) { // Get rects - SDL_Rect rcSet = {x * magnification, y * magnification, (rect->right - rect->left) * magnification, (rect->bottom - rect->top) * magnification}; + SDL_Rect rcSet = {x * magnification, y * magnification, (int)(rect->right - rect->left) * magnification, (int)(rect->bottom - rect->top) * magnification}; SDL_Rect frameRect = RectToSDLRectScaled(rect); SDL_BlitSurface(surf[from].surface, &frameRect, surf[to].surface, &rcSet);