Merge pull request #9595 from Dentomologist/fix_vertex_loader_test_warnings
VertexLoaderTest: Fix memset assignment warning
This commit is contained in:
commit
56fdde5d74
|
@ -209,7 +209,7 @@ struct TVtxDesc
|
||||||
BitField<15, 2, VertexComponentFormat> Color1;
|
BitField<15, 2, VertexComponentFormat> Color1;
|
||||||
BitFieldArray<13, 2, 2, VertexComponentFormat> Color;
|
BitFieldArray<13, 2, 2, VertexComponentFormat> Color;
|
||||||
|
|
||||||
u32 Hex;
|
u32 Hex = 0;
|
||||||
};
|
};
|
||||||
union High
|
union High
|
||||||
{
|
{
|
||||||
|
@ -223,7 +223,7 @@ struct TVtxDesc
|
||||||
BitField<14, 2, VertexComponentFormat> Tex7Coord;
|
BitField<14, 2, VertexComponentFormat> Tex7Coord;
|
||||||
BitFieldArray<0, 2, 8, VertexComponentFormat> TexCoord;
|
BitFieldArray<0, 2, 8, VertexComponentFormat> TexCoord;
|
||||||
|
|
||||||
u32 Hex;
|
u32 Hex = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
Low low;
|
Low low;
|
||||||
|
@ -291,7 +291,7 @@ struct fmt::formatter<TVtxDesc>
|
||||||
|
|
||||||
union UVAT_group0
|
union UVAT_group0
|
||||||
{
|
{
|
||||||
u32 Hex;
|
u32 Hex = 0;
|
||||||
// 0:8
|
// 0:8
|
||||||
BitField<0, 1, CoordComponentCount> PosElements;
|
BitField<0, 1, CoordComponentCount> PosElements;
|
||||||
BitField<1, 3, ComponentFormat> PosFormat;
|
BitField<1, 3, ComponentFormat> PosFormat;
|
||||||
|
@ -350,7 +350,7 @@ struct fmt::formatter<UVAT_group0>
|
||||||
|
|
||||||
union UVAT_group1
|
union UVAT_group1
|
||||||
{
|
{
|
||||||
u32 Hex;
|
u32 Hex = 0;
|
||||||
// 0:8
|
// 0:8
|
||||||
BitField<0, 1, TexComponentCount> Tex1CoordElements;
|
BitField<0, 1, TexComponentCount> Tex1CoordElements;
|
||||||
BitField<1, 3, ComponentFormat> Tex1CoordFormat;
|
BitField<1, 3, ComponentFormat> Tex1CoordFormat;
|
||||||
|
@ -399,7 +399,7 @@ struct fmt::formatter<UVAT_group1>
|
||||||
|
|
||||||
union UVAT_group2
|
union UVAT_group2
|
||||||
{
|
{
|
||||||
u32 Hex;
|
u32 Hex = 0;
|
||||||
// 0:4
|
// 0:4
|
||||||
BitField<0, 5, u8, u32> Tex4Frac;
|
BitField<0, 5, u8, u32> Tex4Frac;
|
||||||
// 5:13
|
// 5:13
|
||||||
|
|
|
@ -23,9 +23,7 @@ TEST(VertexLoaderUID, UniqueEnough)
|
||||||
std::unordered_set<VertexLoaderUID> uids;
|
std::unordered_set<VertexLoaderUID> uids;
|
||||||
|
|
||||||
TVtxDesc vtx_desc;
|
TVtxDesc vtx_desc;
|
||||||
memset(&vtx_desc, 0, sizeof(vtx_desc));
|
|
||||||
VAT vat;
|
VAT vat;
|
||||||
memset(&vat, 0, sizeof(vat));
|
|
||||||
uids.insert(VertexLoaderUID(vtx_desc, vat));
|
uids.insert(VertexLoaderUID(vtx_desc, vat));
|
||||||
|
|
||||||
vtx_desc.low.Hex = 0x76543210;
|
vtx_desc.low.Hex = 0x76543210;
|
||||||
|
@ -51,8 +49,12 @@ protected:
|
||||||
memset(input_memory, 0, sizeof(input_memory));
|
memset(input_memory, 0, sizeof(input_memory));
|
||||||
memset(output_memory, 0xFF, sizeof(input_memory));
|
memset(output_memory, 0xFF, sizeof(input_memory));
|
||||||
|
|
||||||
memset(&m_vtx_desc, 0, sizeof(m_vtx_desc));
|
m_vtx_desc.low.Hex = 0;
|
||||||
memset(&m_vtx_attr, 0, sizeof(m_vtx_attr));
|
m_vtx_desc.high.Hex = 0;
|
||||||
|
|
||||||
|
m_vtx_attr.g0.Hex = 0;
|
||||||
|
m_vtx_attr.g1.Hex = 0;
|
||||||
|
m_vtx_attr.g2.Hex = 0;
|
||||||
|
|
||||||
m_loader = nullptr;
|
m_loader = nullptr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue