From ae7fcc440c40b5f925da20330d71bca0b5186de5 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Mon, 25 Nov 2019 21:27:09 -0800 Subject: [PATCH] Use C++11 default copy ctor for wxUniCharRef It's a little simpler, and still suppresses -Wdeprecated-copy warnings --- include/wx/unichar.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/wx/unichar.h b/include/wx/unichar.h index 07dda658dd..55d4006803 100644 --- a/include/wx/unichar.h +++ b/include/wx/unichar.h @@ -267,10 +267,8 @@ public: wxUniCharRef& operator=(const wxUniCharRef& c) { if (&c != this) *this = c.UniChar(); return *this; } -#if wxUSE_UNICODE_UTF8 - wxUniCharRef(const wxUniCharRef& that) : m_str(that.m_str), m_pos(that.m_pos) { } -#else - wxUniCharRef(const wxUniCharRef& that) : m_pos(that.m_pos) { } +#if __cplusplus >= 201103 + wxUniCharRef(const wxUniCharRef&) = default; #endif #define wxUNICHAR_REF_DEFINE_OPERATOR_EQUAL(type) \