VertexLoaderTest: Fix memset assignment warning

Initialize and assign members of TVtxDesc and VAT structs directly
instead of using memset.

Fixes -Wclass-memaccess warning from gcc on Debian.
This commit is contained in:
Dentomologist
2021-03-18 19:24:35 -07:00
parent bc4d0b3ef8
commit 1cc035eb05
2 changed files with 11 additions and 9 deletions

View File

@ -193,7 +193,7 @@ struct TVtxDesc
BitField<15, 2, VertexComponentFormat> Color1;
BitFieldArray<13, 2, 2, VertexComponentFormat> Color;
u32 Hex;
u32 Hex = 0;
};
union High
{
@ -207,7 +207,7 @@ struct TVtxDesc
BitField<14, 2, VertexComponentFormat> Tex7Coord;
BitFieldArray<0, 2, 8, VertexComponentFormat> TexCoord;
u32 Hex;
u32 Hex = 0;
};
Low low;
@ -288,7 +288,7 @@ struct fmt::formatter<TVtxDesc>
union UVAT_group0
{
u32 Hex;
u32 Hex = 0;
// 0:8
BitField<0, 1, CoordComponentCount> PosElements;
BitField<1, 3, ComponentFormat> PosFormat;
@ -347,7 +347,7 @@ struct fmt::formatter<UVAT_group0>
union UVAT_group1
{
u32 Hex;
u32 Hex = 0;
// 0:8
BitField<0, 1, TexComponentCount> Tex1CoordElements;
BitField<1, 3, ComponentFormat> Tex1CoordFormat;
@ -396,7 +396,7 @@ struct fmt::formatter<UVAT_group1>
union UVAT_group2
{
u32 Hex;
u32 Hex = 0;
// 0:4
BitField<0, 5, u32> Tex4Frac;
// 5:13