diff options
author | Andy Maloney <andy@ackackgames.com> | 2021-03-01 09:03:40 -0500 |
---|---|---|
committer | Andy Maloney <andy@ackackgames.com> | 2021-03-01 09:03:40 -0500 |
commit | 8d1abe2a00a1d45019e5b1064b3b7e92b0ec80a4 (patch) | |
tree | e96941e2a9dab5a7b6b47df5b4894c68c8c832be /servers/rendering_server.cpp | |
parent | bd42a6c51e384f55bbfda9ce64f85b471dbabda6 (diff) |
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.)
Diffstat (limited to 'servers/rendering_server.cpp')
-rw-r--r-- | servers/rendering_server.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 809343114c..0cbdc02506 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: |