Rename or refactor macros to avoid leading underscores

These are not used consistently and some can conflict with
system-specific defines.  While here, also delete some unused macros.
This commit is contained in:
Omar Polo
2021-08-09 19:28:08 +02:00
parent 8fc0dd9997
commit bd448e5535
12 changed files with 95 additions and 94 deletions

View File

@@ -2771,13 +2771,14 @@ void RenderingServer::mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry
const Geometry3D::MeshData::Face &f = p_mesh_data.faces[i];
for (int j = 2; j < f.indices.size(); j++) {
#define _ADD_VERTEX(m_idx) \
vertices.push_back(p_mesh_data.vertices[f.indices[m_idx]]); \
normals.push_back(f.plane.normal);
vertices.push_back(p_mesh_data.vertices[f.indices[0]]);
normals.push_back(f.plane.normal);
_ADD_VERTEX(0);
_ADD_VERTEX(j - 1);
_ADD_VERTEX(j);
vertices.push_back(p_mesh_data.vertices[f.indices[j - 1]]);
normals.push_back(f.plane.normal);
vertices.push_back(p_mesh_data.vertices[f.indices[j]]);
normals.push_back(f.plane.normal);
}
}