Switch similar/arch/ogl to C++ casts

This commit is contained in:
Kp 2016-09-04 00:02:53 +00:00
parent 0e5e1a68a9
commit 53196ec990
2 changed files with 2 additions and 2 deletions

View file

@ -660,7 +660,7 @@ int gr_set_mode(screen_mode mode)
const uint_fast32_t w = SM_W(mode), h = SM_H(mode);
gr_bm_data = grd_curscreen->sc_canvas.cv_bitmap.get_bitmap_data();//since we use realloc, we want to keep this pointer around.
unsigned char *gr_new_bm_data = (unsigned char *)d_realloc(gr_bm_data,w*h);
auto gr_new_bm_data = reinterpret_cast<uint8_t *>(d_realloc(gr_bm_data, w * h));
if (!gr_new_bm_data)
return 0;
*grd_curscreen = {};

View file

@ -913,7 +913,7 @@ void _g3_draw_tmap(unsigned nv, const g3s_point *const *const pointlist, const g
} else if (tmap_drawer_ptr == draw_tmap_flat) {
OGL_DISABLE(TEXTURE_2D);
/* for cloaked state faces */
color_alpha = 1.0 - (grd_curcanv->cv_fade_level/(GLfloat)NUM_LIGHTING_LEVELS);
color_alpha = 1.0 - (grd_curcanv->cv_fade_level/ static_cast<GLfloat>(NUM_LIGHTING_LEVELS));
} else {
glmprintf((0,"g3_draw_tmap: unhandled tmap_drawer %p\n",tmap_drawer_ptr));
return;