@@ -415,8 +415,8 @@ void DrawingGameVisitor::visit(Road& road) {
415415 auto cosPerp = std::cos (roadPerpAngle);
416416 auto sinPerp = std::sin (roadPerpAngle);
417417
418- float * color = road.getOwner ().getColor ();
419- glColor3d (color[ 0 ], color[ 1 ], color[ 2 ] );
418+ auto color = road.getOwner ().getColor ();
419+ glColor3f (std::get< 0 >(color), std::get< 1 >(color), std::get< 2 >(color) );
420420
421421 glBindTexture (GL_TEXTURE_2D, 0 );
422422 glBegin (GL_QUADS);
@@ -437,8 +437,8 @@ void DrawingGameVisitor::visit(Settlement& settlement) {
437437 auto centerScreenPos = coordToScreen (settlement.getLocation ());
438438
439439 glBindTexture (GL_TEXTURE_2D, 0 );
440- float * color = settlement.getOwner ().getColor ();
441- glColor3d (color[ 0 ], color[ 1 ], color[ 2 ] );
440+ auto color = settlement.getOwner ().getColor ();
441+ glColor3f (std::get< 0 >(color), std::get< 1 >(color), std::get< 2 >(color) );
442442
443443 glBegin (GL_QUADS);
444444 glVertex2d (centerScreenPos.first , centerScreenPos.second + settlementRadius);
@@ -459,8 +459,8 @@ void DrawingGameVisitor::visit(City& city) {
459459
460460 glBindTexture (GL_TEXTURE_2D, 0 );
461461
462- float * color = city.getOwner ().getColor ();
463- glColor3d (color[ 0 ], color[ 1 ], color[ 2 ] );
462+ auto color = city.getOwner ().getColor ();
463+ glColor3f (std::get< 0 >(color), std::get< 1 >(color), std::get< 2 >(color) );
464464
465465 glBegin (GL_QUADS);
466466 glVertex2d (centerScreenPos.first + cityRadius, centerScreenPos.second + cityRadius);
@@ -481,8 +481,8 @@ void DrawingGameVisitor::visit(Wonder& wonder) {
481481
482482 glBindTexture (GL_TEXTURE_2D, 0 );
483483
484- float * color = wonder.getOwner ().getColor ();
485- glColor3d (color[ 0 ], color[ 1 ], color[ 2 ] );
484+ auto color = wonder.getOwner ().getColor ();
485+ glColor3f (std::get< 0 >(color), std::get< 1 >(color), std::get< 2 >(color) );
486486
487487 glBegin (GL_QUADS);
488488 glVertex2d (centerScreenPos.first + wonderRadius, centerScreenPos.second + wonderRadius);
0 commit comments