mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-25 16:48:44 +02:00
Define a wxFileNameWrapper that does not crash GCC 5.0. Thanks, Max Kellermann.
This commit is contained in:
parent
5c02e01e48
commit
a5b7b3a45e
@ -28,7 +28,7 @@ public:
|
|||||||
void swap(wxFileNameWrapper &that)
|
void swap(wxFileNameWrapper &that)
|
||||||
{
|
{
|
||||||
if (this != &that) {
|
if (this != &that) {
|
||||||
#if 1
|
#if 0
|
||||||
// Awful hack number 1 makes gcc 5 choke
|
// Awful hack number 1 makes gcc 5 choke
|
||||||
enum : size_t { Size = sizeof(*this) };
|
enum : size_t { Size = sizeof(*this) };
|
||||||
// Do it bitwise.
|
// Do it bitwise.
|
||||||
@ -39,6 +39,7 @@ public:
|
|||||||
memcpy(&that, &buffer, Size);
|
memcpy(&that, &buffer, Size);
|
||||||
#else
|
#else
|
||||||
// Awful hack number 2 relies on knowing the class layout
|
// Awful hack number 2 relies on knowing the class layout
|
||||||
|
// This is the less evil one but watch out for redefinition of the base class
|
||||||
struct Contents
|
struct Contents
|
||||||
{
|
{
|
||||||
void swap(Contents &that) {
|
void swap(Contents &that) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user