mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 12:48:57 +00:00
Suppress memcpy writing to an object with no trivial copy-assignment warnings
We need to copy padding in most of these cases, and the objects are trivially copyable; however, BitField prevents trivial copy-assignment.
This commit is contained in:
parent
ac7a17579e
commit
3024ca2146
6 changed files with 49 additions and 0 deletions
|
@ -17,7 +17,14 @@ CPState g_preprocess_cp_state;
|
|||
|
||||
void CopyPreprocessCPStateFromMain()
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wclass-memaccess"
|
||||
#endif
|
||||
std::memcpy(&g_preprocess_cp_state, &g_main_cp_state, sizeof(CPState));
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
std::pair<std::string, std::string> GetCPRegInfo(u8 cmd, u32 value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue