Use macros to define default copy constructor and assignment operator

This commit is contained in:
Maarten Bent
2020-04-13 15:05:29 +02:00
parent 287c1b1d11
commit 1448b210b8
5 changed files with 35 additions and 12 deletions

View File

@@ -267,9 +267,7 @@ public:
wxUniCharRef& operator=(const wxUniCharRef& c)
{ if (&c != this) *this = c.UniChar(); return *this; }
#ifdef wxHAS_MEMBER_DEFAULT
wxUniCharRef(const wxUniCharRef&) wxMEMBER_DEFAULT;
#endif
wxDECLARE_DEFAULT_COPY_CTOR(wxUniCharRef);
#define wxUNICHAR_REF_DEFINE_OPERATOR_EQUAL(type) \
wxUniCharRef& operator=(type c) { return *this = wxUniChar(c); }