Initialize array before use (#2011)

gcc detects usage of this array as uninitialized, so make sure it's initialized. I am not sure if this is a legitimate warning, or if the code guarantees the array gets initialized before use in lines 140-142 and this is a performance optimization.
master
Zi Ree 2024-07-12 18:08:56 +02:00 committed by GitHub
parent becdc46bdc
commit af93e58192
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ struct MikktMesh
for (U32 tri_idx = 0; tri_idx < U32(triangle_count); ++tri_idx)
{
U32 idx[3];
U32 idx[3] = {0, 0, 0};
if (prim->mMode == Primitive::Mode::TRIANGLES)
{