Skip to content

Commit 587c8fc

Browse files
committed
Fix c++11 narrowing error
src/video/mng.cpp:301:20: error: non-constant-expression cannot be narrowed from type 'int' to 'Sint16' (aka 'short') in initializer list [-Wc++11-narrowing] SDL_Rect rect = {x, y, surface->w, surface->h}; ^
1 parent 88845d8 commit 587c8fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/video/mng.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ void Mng::Draw(int x, int y)
298298
} else
299299
#endif
300300
{
301-
SDL_Rect rect = {x, y, surface->w, surface->h};
301+
SDL_Rect rect = {(Sint16)x, (Sint16)y, (Uint16)surface->w, (Uint16)surface->h};
302302
SDL_BlitSurface(surface, NULL, TheScreen, &rect);
303303
}
304304
}

0 commit comments

Comments
 (0)