Fix build

master
Jeremy Hu 2018-09-14 18:06:07 +08:00
parent 48bc8df5c3
commit 360ed52a5c
1 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ int meshQuadify(void *meshlite, int meshId, const std::set<std::pair<PositionMap
float *vertexPositions = new float[vertexCount * 3]; float *vertexPositions = new float[vertexCount * 3];
int vertexArrayLen = meshlite_get_vertex_position_array(meshlite, meshId, vertexPositions, vertexCount * 3); int vertexArrayLen = meshlite_get_vertex_position_array(meshlite, meshId, vertexPositions, vertexCount * 3);
int offset = 0; int offset = 0;
assert(vertexArrayLen == vertexCount * 3); Q_ASSERT(vertexArrayLen == vertexCount * 3);
std::map<int, PositionMapKey> positionKeyMap; std::map<int, PositionMapKey> positionKeyMap;
for (int i = 0; i < vertexCount; i++) { for (int i = 0; i < vertexCount; i++) {
float x = vertexPositions[offset + 0]; float x = vertexPositions[offset + 0];
@ -26,7 +26,7 @@ int meshQuadify(void *meshlite, int meshId, const std::set<std::pair<PositionMap
std::vector<std::vector<int>> newFaceIndicies; std::vector<std::vector<int>> newFaceIndicies;
while (i < filledLength) { while (i < filledLength) {
int num = faceVertexNumAndIndices[i++]; int num = faceVertexNumAndIndices[i++];
assert(num > 0 && num <= MAX_VERTICES_PER_FACE); Q_ASSERT(num > 0 && num <= MAX_VERTICES_PER_FACE);
if (num < 3) { if (num < 3) {
i += num; i += num;
continue; continue;
@ -34,7 +34,7 @@ int meshQuadify(void *meshlite, int meshId, const std::set<std::pair<PositionMap
std::vector<int> indices; std::vector<int> indices;
for (int j = 0; j < num; j++) { for (int j = 0; j < num; j++) {
int index = faceVertexNumAndIndices[i++]; int index = faceVertexNumAndIndices[i++];
assert(index >= 0 && index < vertexCount); Q_ASSERT(index >= 0 && index < vertexCount);
indices.push_back(index); indices.push_back(index);
} }
newFaceIndicies.push_back(indices); newFaceIndicies.push_back(indices);