From 9039340da96b7b698f371a14f519b30f9f830bce Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Mon, 13 Apr 2020 19:44:04 +0200 Subject: [PATCH] Revert default-member changes, only keep and use wxHAS_MEMBER_DEFAULT --- include/wx/animate.h | 5 ++++- include/wx/defs.h | 16 ---------------- include/wx/unichar.h | 4 +++- interface/wx/defs.h | 16 ---------------- 4 files changed, 7 insertions(+), 34 deletions(-) diff --git a/include/wx/animate.h b/include/wx/animate.h index 0f6fefc1c8..92051d6490 100644 --- a/include/wx/animate.h +++ b/include/wx/animate.h @@ -38,7 +38,10 @@ public: wxAnimation(); explicit wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY); - wxDECLARE_DEFAULT_COPY_CLASS(wxAnimation); +#ifdef wxHAS_MEMBER_DEFAULT + wxAnimation(const wxAnimation&) = default; + wxAnimation& operator=(const wxAnimation&) = default; +#endif bool IsOk() const; bool IsCompatibleWith(wxClassInfo* ci) const; diff --git a/include/wx/defs.h b/include/wx/defs.h index 0982c2936b..3322d7c5cf 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -3039,22 +3039,6 @@ typedef const void* WXWidget; #define DECLARE_NO_ASSIGN_CLASS(classname) \ wxDECLARE_NO_ASSIGN_CLASS(classname); -/* --------------------------------------------------------------------------- */ -/* macros to define a class with default copy constructor and/or assignment operator */ -/* --------------------------------------------------------------------------- */ - -#ifdef wxHAS_MEMBER_DEFAULT -#define wxDECLARE_DEFAULT_COPY_CTOR(classname) \ - classname(const classname&) = default - -#define wxDECLARE_DEFAULT_COPY_CLASS(classname) \ - wxDECLARE_DEFAULT_COPY_CTOR(classname); \ - classname& operator=(const classname&) = default -#else -#define wxDECLARE_DEFAULT_COPY_CTOR(classname) -#define wxDECLARE_DEFAULT_COPY_CLASS(classname) -#endif - /* --------------------------------------------------------------------------- */ /* If a manifest is being automatically generated, add common controls 6 to it */ /* --------------------------------------------------------------------------- */ diff --git a/include/wx/unichar.h b/include/wx/unichar.h index 304c4bdeeb..1fc45eb937 100644 --- a/include/wx/unichar.h +++ b/include/wx/unichar.h @@ -267,7 +267,9 @@ public: wxUniCharRef& operator=(const wxUniCharRef& c) { if (&c != this) *this = c.UniChar(); return *this; } - wxDECLARE_DEFAULT_COPY_CTOR(wxUniCharRef); +#ifdef wxHAS_MEMBER_DEFAULT + wxUniCharRef(const wxUniCharRef&) = default; +#endif #define wxUNICHAR_REF_DEFINE_OPERATOR_EQUAL(type) \ wxUniCharRef& operator=(type c) { return *this = wxUniChar(c); } diff --git a/interface/wx/defs.h b/interface/wx/defs.h index ac1d634654..4d88c51dc0 100644 --- a/interface/wx/defs.h +++ b/interface/wx/defs.h @@ -1561,22 +1561,6 @@ typedef double wxDouble; */ #define wxDECLARE_NO_COPY_TEMPLATE_CLASS_2(classname, arg1, arg2) -/** - This macro can be used in a class declaration to enable declaring the - default copy constructor and assignment operator. - - @since 3.1.4 - */ -#define wxDECLARE_DEFAULT_COPY_CLASS(classname) - -/** - This macro can be used in a class declaration to enable declaring the - default copy constructor. - - @since 3.1.4 - */ -#define wxDECLARE_DEFAULT_COPY_CTOR(classname) - /** A function which deletes and nulls the pointer.