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.)
This commit is contained in:
Andy Maloney 2021-03-01 09:03:40 -05:00
parent bd42a6c51e
commit 8d1abe2a00
1 changed files with 1 additions and 12 deletions

View File

@ -742,19 +742,11 @@ void RenderingServer::mesh_surface_make_offsets_from_format(uint32_t p_format, i
elem_size = 3; elem_size = 3;
} }
{ elem_size *= sizeof(float);
elem_size *= sizeof(float);
}
if (elem_size == 6) {
elem_size = 8;
}
} break; } break;
case RS::ARRAY_NORMAL: { case RS::ARRAY_NORMAL: {
elem_size = 4; elem_size = 4;
} break; } break;
case RS::ARRAY_TANGENT: { case RS::ARRAY_TANGENT: {
elem_size = 4; elem_size = 4;
} break; } break;
@ -763,12 +755,9 @@ void RenderingServer::mesh_surface_make_offsets_from_format(uint32_t p_format, i
} break; } break;
case RS::ARRAY_TEX_UV: { case RS::ARRAY_TEX_UV: {
elem_size = 8; elem_size = 8;
} break; } break;
case RS::ARRAY_TEX_UV2: { case RS::ARRAY_TEX_UV2: {
elem_size = 8; elem_size = 8;
} break; } break;
case RS::ARRAY_CUSTOM0: case RS::ARRAY_CUSTOM0:
case RS::ARRAY_CUSTOM1: case RS::ARRAY_CUSTOM1: