Fix SDL-only build of automap.cpp

`const auto &&` deduces a type that is always const, which breaks the
SDL-only build.  Use cg3s_point explicitly, so that the type is const
for OpenGL and mutable for SDL-only.

Fixes: ec6a78c481 ("Use enum class for marker index types")
This commit is contained in:
Kp 2020-11-30 05:12:00 +00:00
parent 64d50d624a
commit dd5f31a19c

View file

@ -539,7 +539,10 @@ static void DrawMarkers(fvcobjptr &vcobjptr, grs_canvas &canvas, automap &am)
auto &&[gmi, pmi, objidx] = *iter;
if (objidx != object_none)
{
const auto &&sphere_point = g3_rotate_point(vcobjptr(objidx)->pos);
/* Use cg3s_point so that the type is const for OpenGL and
* mutable for SDL-only.
*/
cg3s_point &&sphere_point = g3_rotate_point(vcobjptr(objidx)->pos);
g3_draw_sphere(canvas, sphere_point, MARKER_SPHERE_SIZE, colors[0]);
g3_draw_sphere(canvas, sphere_point, MARKER_SPHERE_SIZE / 2, colors[1]);
g3_draw_sphere(canvas, sphere_point, MARKER_SPHERE_SIZE / 4, colors[2]);