From 8d1abe2a00a1d45019e5b1064b3b7e92b0ec80a4 Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Mon, 1 Mar 2021 09:03:40 -0500 Subject: [PATCH] Remove impossible condition in RenderingServer::mesh_surface_make_offsets_from_format sizeof(float) cannot be less than 4, so the condition is impossible. (Also remove extra blank lines in cases for consistency.) --- servers/rendering_server.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 809343114c2..0cbdc025069 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -742,19 +742,11 @@ void RenderingServer::mesh_surface_make_offsets_from_format(uint32_t p_format, i elem_size = 3; } - { - elem_size *= sizeof(float); - } - - if (elem_size == 6) { - elem_size = 8; - } - + elem_size *= sizeof(float); } break; case RS::ARRAY_NORMAL: { elem_size = 4; } break; - case RS::ARRAY_TANGENT: { elem_size = 4; } break; @@ -763,12 +755,9 @@ void RenderingServer::mesh_surface_make_offsets_from_format(uint32_t p_format, i } break; case RS::ARRAY_TEX_UV: { elem_size = 8; - } break; - case RS::ARRAY_TEX_UV2: { elem_size = 8; - } break; case RS::ARRAY_CUSTOM0: case RS::ARRAY_CUSTOM1: