From bd448e5535686a4473d185f4103b4ac4dedf0c71 Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Mon, 9 Aug 2021 19:28:08 +0200 Subject: 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. --- servers/rendering_server.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'servers/rendering_server.cpp') diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 21cc1017ae..84e54eab22 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -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); } } -- cgit v1.2.3