diff --git a/similar/arch/ogl/gr.cpp b/similar/arch/ogl/gr.cpp index 390ca94ec..5cab50612 100644 --- a/similar/arch/ogl/gr.cpp +++ b/similar/arch/ogl/gr.cpp @@ -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(d_realloc(gr_bm_data, w * h)); if (!gr_new_bm_data) return 0; *grd_curscreen = {}; diff --git a/similar/arch/ogl/ogl.cpp b/similar/arch/ogl/ogl.cpp index c8b5ce540..8c046ff28 100644 --- a/similar/arch/ogl/ogl.cpp +++ b/similar/arch/ogl/ogl.cpp @@ -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(NUM_LIGHTING_LEVELS)); } else { glmprintf((0,"g3_draw_tmap: unhandled tmap_drawer %p\n",tmap_drawer_ptr)); return;