Made test_conformity arrays static

This commit is contained in:
Tormod Haugland 2014-04-27 10:34:32 +02:00
parent 730a4fb5d3
commit cc14f19ed3

View File

@ -19,11 +19,10 @@ int test_conformity()
const int vertexCount = 100000; const int vertexCount = 100000;
glm::vec3** vertices = new glm::vec3*[vertexCount]; glm::vec3 vertices[vertexCount][6];
for (int i = 0; i < vertexCount; ++i) for (int i = 0; i < vertexCount; ++i)
{ {
vertices[i] = new glm::vec3[6];
vertices[i][0] = glm::vec3((float)(rand() % 1000)/100, (float)(rand() % 1000)/100,(float)(rand() % 1000)/100); vertices[i][0] = glm::vec3((float)(rand() % 1000)/100, (float)(rand() % 1000)/100,(float)(rand() % 1000)/100);
vertices[i][1] = glm::vec3((float)(rand() % 1000)/100, (float)(rand() % 1000)/100,(float)(rand() % 1000)/100); vertices[i][1] = glm::vec3((float)(rand() % 1000)/100, (float)(rand() % 1000)/100,(float)(rand() % 1000)/100);
vertices[i][2] = glm::vec3((float)(rand() % 1000)/100, (float)(rand() % 1000)/100,(float)(rand() % 1000)/100); vertices[i][2] = glm::vec3((float)(rand() % 1000)/100, (float)(rand() % 1000)/100,(float)(rand() % 1000)/100);
@ -73,7 +72,6 @@ int test_conformity()
assert(intersects_line == intersects_line_tri); assert(intersects_line == intersects_line_tri);
} }
delete vertices;
return Error; return Error;
} }