mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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:
@ -23,9 +23,7 @@ TEST(VertexLoaderUID, UniqueEnough)
|
||||
std::unordered_set<VertexLoaderUID> uids;
|
||||
|
||||
TVtxDesc vtx_desc;
|
||||
memset(&vtx_desc, 0, sizeof(vtx_desc));
|
||||
VAT vat;
|
||||
memset(&vat, 0, sizeof(vat));
|
||||
uids.insert(VertexLoaderUID(vtx_desc, vat));
|
||||
|
||||
vtx_desc.SetLegacyHex(0xFEDCBA9876543210ull);
|
||||
@ -50,8 +48,12 @@ protected:
|
||||
memset(input_memory, 0, sizeof(input_memory));
|
||||
memset(output_memory, 0xFF, sizeof(input_memory));
|
||||
|
||||
memset(&m_vtx_desc, 0, sizeof(m_vtx_desc));
|
||||
memset(&m_vtx_attr, 0, sizeof(m_vtx_attr));
|
||||
m_vtx_desc.low.Hex = 0;
|
||||
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;
|
||||
|
||||
|
Reference in New Issue
Block a user