Clean up initializer list code.

This commit is contained in:
Christophe Riccio
2014-02-08 19:08:09 +01:00
parent 4e444fed19
commit 31ec3eed97
10 changed files with 25 additions and 76 deletions

View File

@@ -189,19 +189,6 @@ int test_ctr()
{
int Error(0);
{
glm::vec4 V{0, 1, 2, 3};
glm::mat4 M{
{0, 1, 2, 3},
{4, 5, 6, 7},
{8, 9, 10, 11},
{12, 13, 14, 15}};
}
glm::mat4 m4{
{0, 1, 2, 3}};
#if(GLM_HAS_INITIALIZER_LISTS)
glm::mat4 m0(
glm::vec4(0, 1, 2, 3),
@@ -211,6 +198,8 @@ int test_ctr()
assert(sizeof(m0) == 4 * 4 * 4);
glm::vec4 V{0, 1, 2, 3};
glm::mat4 m1{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
glm::mat4 m2{
@@ -231,19 +220,9 @@ int test_ctr()
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}};
/*
std::initializer_list<glm::mat4> m3{
{0, 1, 2, 3},
{4, 5, 6, 7},
{8, 9, 10, 11},
{12, 13, 14, 15}};
*/
//glm::mat4 m4{m3};
std::vector<glm::mat4> v1{
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
};
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}};
std::vector<glm::mat4> v2{
{
@@ -257,8 +236,7 @@ int test_ctr()
{ 4, 5, 6, 7 },
{ 8, 9, 10, 11 },
{ 12, 13, 14, 15 }
}
};
}};
#endif//GLM_HAS_INITIALIZER_LISTS