converted some old C style casts to new c++ style casts

Those casts created warnings that broke building with cmake and gcc 4.9.3.
This commit is contained in:
Nils Kneuper 2015-08-23 11:05:06 +02:00
parent e43a4a3ebd
commit c51c913156
2 changed files with 4 additions and 4 deletions

View file

@ -1014,8 +1014,8 @@ int game_lua_kernel::intf_set_variable(lua_State *L)
int game_lua_kernel::intf_random(lua_State *L)
{
if(lua_isnoneornil(L, 1)) {
double r = (double)random_new::generator->next_random();
double r_max = (double)std::numeric_limits<uint32_t>::max();
double r = double (random_new::generator->next_random());
double r_max = double (std::numeric_limits<uint32_t>::max());
lua_push(L, r / (r_max + 1));
return 1;
}

View file

@ -28,9 +28,9 @@ namespace gui {
: "buttons/checkbox.png");
blit_surface(img, NULL, video().getSurface(), &rect);
SDL_Rect newrect = {
(Sint16) (rect.x + img->w + 2),
Sint16 (rect.x + img->w + 2),
rect.y,
(Uint16) (rect.w - img->w - 2),
Uint16 (rect.w - img->w - 2),
rect.h
};
menu::draw_row(row_index, newrect, type);