From: Václav Slavík Date: Sat, 28 Mar 2009 09:35:53 +0000 (+0000) Subject: don't duplicate copy ctor and assignment operator code in wxCharTypeBuffer, it... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3339414ae8f2795019abaa12091c4ea811692022 don't duplicate copy ctor and assignment operator code in wxCharTypeBuffer, it was identical to base class' version git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/buffer.h b/include/wx/buffer.h index e3e1ac0e66..3be01fee36 100644 --- a/include/wx/buffer.h +++ b/include/wx/buffer.h @@ -245,10 +245,7 @@ public: } wxCharTypeBuffer(const wxCharTypeBuffer& src) - { - this->m_data = src.m_data; - this->IncRef(); - } + : wxScopedCharTypeBuffer(src) {} wxCharTypeBuffer& operator=(const CharType *str) { @@ -261,13 +258,7 @@ public: wxCharTypeBuffer& operator=(const wxCharTypeBuffer& src) { - if ( &src == this ) - return *this; - - this->DecRef(); - this->m_data = src.m_data; - this->IncRef(); - + wxScopedCharTypeBuffer::operator=(src); return *this; }