From 0fbc05b96ca9b464b273d64349d9a7940a0c992b Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Thu, 26 Jun 2014 22:36:57 +0200 Subject: Fix test compilation --- src/graphics/core/vertex.h | 4 +++- test/envs/opengl/light_test.cpp | 4 ++-- test/envs/opengl/transform_test.cpp | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/graphics/core/vertex.h b/src/graphics/core/vertex.h index c3a657a..ca68352 100644 --- a/src/graphics/core/vertex.h +++ b/src/graphics/core/vertex.h @@ -82,7 +82,9 @@ struct VertexCol Math::Vector coord; Color color; - explicit VertexCol(Math::Vector aCoord = Math::Vector(), + VertexCol() = default; + + explicit VertexCol(Math::Vector aCoord, Color aColor = Color()) : coord(aCoord), color(aColor) {} diff --git a/test/envs/opengl/light_test.cpp b/test/envs/opengl/light_test.cpp index 1a52084..5c5af7c 100644 --- a/test/envs/opengl/light_test.cpp +++ b/test/envs/opengl/light_test.cpp @@ -78,7 +78,7 @@ void Render(Gfx::CGLDevice *device) worldMat.LoadIdentity(); device->SetTransform(Gfx::TRANSFORM_WORLD, worldMat); - Gfx::VertexCol line[2] = Gfx::VertexCol{ Gfx::VertexCol() }; + Gfx::VertexCol line[2] = {}; for (int x = -40; x <= 40; ++x) { @@ -103,7 +103,7 @@ void Render(Gfx::CGLDevice *device) } - Gfx::VertexCol quad[6] = Gfx::VertexCol{ Gfx::VertexCol() }; + Gfx::VertexCol quad[6] = {}; quad[0].coord = Math::Vector(-1.0f, -1.0f, 0.0f); quad[1].coord = Math::Vector( 1.0f, -1.0f, 0.0f); diff --git a/test/envs/opengl/transform_test.cpp b/test/envs/opengl/transform_test.cpp index d994cc5..99ec9f0 100644 --- a/test/envs/opengl/transform_test.cpp +++ b/test/envs/opengl/transform_test.cpp @@ -73,7 +73,7 @@ void Render(Gfx::CGLDevice *device) worldMat.LoadIdentity(); device->SetTransform(Gfx::TRANSFORM_WORLD, worldMat); - Gfx::VertexCol line[2] = Gfx::VertexCol{ Gfx::VertexCol() }; + Gfx::VertexCol line[2] = {}; for (int x = -40; x <= 40; ++x) { @@ -98,7 +98,7 @@ void Render(Gfx::CGLDevice *device) } - Gfx::VertexCol quad[6] = Gfx::VertexCol{ Gfx::VertexCol() }; + Gfx::VertexCol quad[6] = {}; for (int i = 0; i < 6; ++i) quad[i].color = Gfx::Color(1.0f, 1.0f, 0.0f); -- cgit v1.2.3-1-g7c22