From a5b7b3a45e1c7be197511a9789e2ad5e47de1ab1 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Thu, 28 Apr 2016 13:17:07 -0400 Subject: [PATCH] Define a wxFileNameWrapper that does not crash GCC 5.0. Thanks, Max Kellermann. --- src/wxFileNameWrapper.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wxFileNameWrapper.h b/src/wxFileNameWrapper.h index ddccfefc0..ffaaeae2a 100644 --- a/src/wxFileNameWrapper.h +++ b/src/wxFileNameWrapper.h @@ -28,7 +28,7 @@ public: void swap(wxFileNameWrapper &that) { if (this != &that) { -#if 1 +#if 0 // Awful hack number 1 makes gcc 5 choke enum : size_t { Size = sizeof(*this) }; // Do it bitwise. @@ -39,6 +39,7 @@ public: memcpy(&that, &buffer, Size); #else // 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 { void swap(Contents &that) {