Fix -Wodr for _g3_draw_poly

x86_64-pc-linux-gnu-g++-6.3 issues a -Wodr diagnostic for the mismatch
between

common/include/3d.h:	void _g3_draw_poly(grs_canvas &, uint_fast32_t nv, cg3s_point *const *pointlist, uint8_t color);
similar/arch/ogl/ogl.cpp:	void _g3_draw_poly(grs_canvas &canvas, const uint_fast32_t nv, const g3s_point *const *const pointlist, const uint8_t palette_color_index)

The declaration and definition are compatible because `cg3s_point` is a
type alias for `const g3s_point`, so the code worked as it was.  Switch
the definition to use `cg3s_point` like the declaration to prevent this
warning and to protect against any future (unlikely) changes to the
definition of `cg3s_point`.
This commit is contained in:
Kp 2017-03-18 18:07:35 +00:00
parent 9878ba2311
commit 274f9047aa

View file

@ -849,7 +849,7 @@ int gr_disk(grs_canvas &canvas, const fix x, const fix y, const fix r, const uin
/*
* Draw flat-shaded Polygon (Lasers, Drone-arms, Driller-ears)
*/
void _g3_draw_poly(grs_canvas &canvas, const uint_fast32_t nv, const g3s_point *const *const pointlist, const uint8_t palette_color_index)
void _g3_draw_poly(grs_canvas &canvas, const uint_fast32_t nv, cg3s_point *const *const pointlist, const uint8_t palette_color_index)
{
struct vfloat
{