mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Fix -Wclass-memaccess warnings
We want to clear/memset the padding bytes, not just each member,
so using assignment or {} initialization is not an option.
To silence the warnings, cast the object pointer to u8* (which is not
undefined behavior) to make it explicit to the compiler that we want
to fill the object representation.
This commit is contained in:
@@ -43,7 +43,7 @@ static const float s_gammaLUT[] = {1.0f, 1.7f, 2.2f, 1.0f};
|
||||
|
||||
void BPInit()
|
||||
{
|
||||
memset(&bpmem, 0, sizeof(bpmem));
|
||||
memset(reinterpret_cast<u8*>(&bpmem), 0, sizeof(bpmem));
|
||||
bpmem.bpMask = 0xFFFFFF;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user