diff --git a/include/wx/arrstr.h b/include/wx/arrstr.h index d716bc0e6b..3194a0053f 100644 --- a/include/wx/arrstr.h +++ b/include/wx/arrstr.h @@ -62,7 +62,6 @@ public: const wxString& second); wxArrayString() { } - wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { } wxArrayString(size_t sz, const char** a); wxArrayString(size_t sz, const wchar_t** a); wxArrayString(size_t sz, const wxString* a); @@ -105,9 +104,6 @@ class WXDLLIMPEXP_BASE wxSortedArrayString : public wxSortedArrayStringBase public: wxSortedArrayString() : wxSortedArrayStringBase(wxStringSortAscending) { } - wxSortedArrayString(const wxSortedArrayString& array) - : wxSortedArrayStringBase(array) - { } wxSortedArrayString(const wxArrayString& src) : wxSortedArrayStringBase(wxStringSortAscending) { diff --git a/include/wx/dvrenderers.h b/include/wx/dvrenderers.h index d93cdd6874..aa50dc61d7 100644 --- a/include/wx/dvrenderers.h +++ b/include/wx/dvrenderers.h @@ -42,12 +42,6 @@ public: m_icon(icon) { } - wxDataViewIconText( const wxDataViewIconText &other ) - : wxObject(), - m_text(other.m_text), - m_icon(other.m_icon) - { } - void SetText( const wxString &text ) { m_text = text; } wxString GetText() const { return m_text; } void SetIcon( const wxIcon &icon ) { m_icon = icon; } diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index a8684e7999..c5cb138e64 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -235,13 +235,6 @@ public: explicit wxBaseSortedArray(SCMPFUNC fn) : m_fnCompare(fn) { } - wxBaseSortedArray& operator=(const wxBaseSortedArray& src) - { - wxBaseArray::operator=(src); - m_fnCompare = src.m_fnCompare; - return *this; - } - size_t IndexForInsert(T item) const { return this->wxBaseArray::IndexForInsert(item, m_fnCompare); @@ -656,9 +649,6 @@ private: wxBaseObjectArrayFor##name; \ classdecl name : public wxBaseObjectArrayFor##name \ { \ - public: \ - name() : wxBaseObjectArrayFor##name() { } \ - name(const name& src) : wxBaseObjectArrayFor##name(src) { } \ } #define WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name, expmode) \ diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 2bc396d140..92f282994f 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -635,16 +635,6 @@ public: void SetCol( int n ) { m_col = n; } void Set( int row, int col ) { m_row = row; m_col = col; } - wxGridCellCoords& operator=( const wxGridCellCoords& other ) - { - if ( &other != this ) - { - m_row=other.m_row; - m_col=other.m_col; - } - return *this; - } - bool operator==( const wxGridCellCoords& other ) const { return (m_row == other.m_row && m_col == other.m_col); diff --git a/include/wx/geometry.h b/include/wx/geometry.h index a3b3f1b8c7..6bf80a9123 100644 --- a/include/wx/geometry.h +++ b/include/wx/geometry.h @@ -629,7 +629,6 @@ public: { m_x *= ((wxDouble)num)/((wxDouble)denum); m_y *= ((wxDouble)num)/((wxDouble)denum); m_width *= ((wxDouble)num)/((wxDouble)denum); m_height *= ((wxDouble)num)/((wxDouble)denum);} - wxRect2DDouble& operator = (const wxRect2DDouble& rect); inline bool operator == (const wxRect2DDouble& rect) const { return wxIsSameDouble(m_x, rect.m_x) && wxIsSameDouble(m_y, rect.m_y) && HaveEqualSize(rect); } inline bool operator != (const wxRect2DDouble& rect) const diff --git a/include/wx/gtk/dataform.h b/include/wx/gtk/dataform.h index b7c3be71f3..5df97d8b85 100644 --- a/include/wx/gtk/dataform.h +++ b/include/wx/gtk/dataform.h @@ -28,15 +28,6 @@ public: wxDataFormat( const wchar_t *id ) { InitFromString(id); } wxDataFormat( const wxCStrData& id ) { InitFromString(id); } - wxDataFormat& operator=(const wxDataFormat& format) - { - if (&format != this) - { - m_type = format.m_type; - m_format = format.m_format; - } - return *this; - } wxDataFormat& operator=(NativeFormat format) { SetId(format); return *this; } diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 6289331e32..df9092a382 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -450,11 +450,6 @@ CLASSEXP CLASSNAME \ public: \ CLASSNAME() { } \ const_key_reference operator()( const_pair_reference pair ) const { return pair.first; }\ - \ - /* the dummy assignment operator is needed to suppress compiler */ \ - /* warnings from hash table class' operator=(): gcc complains about */ \ - /* "statement with no effect" without it */ \ - CLASSNAME& operator=(const CLASSNAME&) { return *this; } \ }; // grow/shrink predicates @@ -471,10 +466,6 @@ inline bool grow_lf70( size_t buckets, size_t items ) // hashing and comparison functors // ---------------------------------------------------------------------------- -// NB: implementation detail: all of these classes must have dummy assignment -// operators to suppress warnings about "statement with no effect" from gcc -// in the hash table class assignment operator (where they're assigned) - #ifndef wxNEEDS_WX_HASH_MAP // integer types @@ -536,8 +527,6 @@ struct WXDLLIMPEXP_BASE wxIntegerHash wxULongLong_t operator()( wxLongLong_t x ) const { return static_cast(x); } wxULongLong_t operator()( wxULongLong_t x ) const { return x; } #endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG - - wxIntegerHash& operator=(const wxIntegerHash&) { return *this; } }; #endif // !wxNEEDS_WX_HASH_MAP/wxNEEDS_WX_HASH_MAP @@ -555,8 +544,6 @@ struct WXDLLIMPEXP_BASE wxIntegerEqual bool operator()( wxLongLong_t a, wxLongLong_t b ) const { return a == b; } bool operator()( wxULongLong_t a, wxULongLong_t b ) const { return a == b; } #endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG - - wxIntegerEqual& operator=(const wxIntegerEqual&) { return *this; } }; // pointers @@ -569,16 +556,12 @@ struct WXDLLIMPEXP_BASE wxPointerHash #else size_t operator()( const void* k ) const { return (size_t)k; } #endif - - wxPointerHash& operator=(const wxPointerHash&) { return *this; } }; struct WXDLLIMPEXP_BASE wxPointerEqual { wxPointerEqual() { } bool operator()( const void* a, const void* b ) const { return a == b; } - - wxPointerEqual& operator=(const wxPointerEqual&) { return *this; } }; // wxString, char*, wchar_t* @@ -603,8 +586,6 @@ struct WXDLLIMPEXP_BASE wxStringHash static unsigned long stringHash( const wchar_t* ); static unsigned long stringHash( const char* ); - - wxStringHash& operator=(const wxStringHash&) { return *this; } }; struct WXDLLIMPEXP_BASE wxStringEqual @@ -618,8 +599,6 @@ struct WXDLLIMPEXP_BASE wxStringEqual bool operator()( const char* a, const char* b ) const { return strcmp( a, b ) == 0; } #endif // wxUSE_UNICODE - - wxStringEqual& operator=(const wxStringEqual&) { return *this; } }; #ifdef wxNEEDS_WX_HASH_MAP diff --git a/include/wx/hashset.h b/include/wx/hashset.h index 82e0d252f5..bb713b87f4 100644 --- a/include/wx/hashset.h +++ b/include/wx/hashset.h @@ -106,11 +106,6 @@ public: \ CLASSNAME() { } \ const_key_reference operator()( const_key_reference key ) const \ { return key; } \ - \ - /* the dummy assignment operator is needed to suppress compiler */ \ - /* warnings from hash table class' operator=(): gcc complains about */ \ - /* "statement with no effect" without it */ \ - CLASSNAME& operator=(const CLASSNAME&) { return *this; } \ }; #define _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, PTROP, CLASSNAME, CLASSEXP )\ diff --git a/include/wx/richtext/richtextbuffer.h b/include/wx/richtext/richtextbuffer.h index ce15e67aea..13e1dfb867 100644 --- a/include/wx/richtext/richtextbuffer.h +++ b/include/wx/richtext/richtextbuffer.h @@ -1312,11 +1312,6 @@ public: */ wxTextBoxAttr() { Init(); } - /** - Copy constructor. - */ - wxTextBoxAttr(const wxTextBoxAttr& attr) { Init(); (*this) = attr; } - /** Initialises this object. */ diff --git a/include/wx/richtext/richtextstyles.h b/include/wx/richtext/richtextstyles.h index c8daef3cbc..44cd9a2ca4 100644 --- a/include/wx/richtext/richtextstyles.h +++ b/include/wx/richtext/richtextstyles.h @@ -132,9 +132,6 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextCharacterStyleDefinition: public wxRichText wxDECLARE_DYNAMIC_CLASS(wxRichTextCharacterStyleDefinition); public: - /// Copy constructor - wxRichTextCharacterStyleDefinition(const wxRichTextCharacterStyleDefinition& def): wxRichTextStyleDefinition(def) {} - /// Default constructor wxRichTextCharacterStyleDefinition(const wxString& name = wxEmptyString): wxRichTextStyleDefinition(name) {} diff --git a/include/wx/sckaddr.h b/include/wx/sckaddr.h index 45fde87625..c0bcc5889a 100644 --- a/include/wx/sckaddr.h +++ b/include/wx/sckaddr.h @@ -71,13 +71,6 @@ private: class WXDLLIMPEXP_NET wxIPaddress : public wxSockAddress { public: - wxIPaddress() : wxSockAddress() { } - wxIPaddress(const wxIPaddress& other) - : wxSockAddress(other), - m_origHostname(other.m_origHostname) - { - } - bool operator==(const wxIPaddress& addr) const; bool Hostname(const wxString& name); @@ -120,9 +113,6 @@ private: class WXDLLIMPEXP_NET wxIPV4address : public wxIPaddress { public: - wxIPV4address() : wxIPaddress() { } - wxIPV4address(const wxIPV4address& other) : wxIPaddress(other) { } - // implement wxSockAddress pure virtuals: virtual Family Type() wxOVERRIDE { return IPV4; } virtual wxSockAddress *Clone() const wxOVERRIDE { return new wxIPV4address(*this); } @@ -155,9 +145,6 @@ private: class WXDLLIMPEXP_NET wxIPV6address : public wxIPaddress { public: - wxIPV6address() : wxIPaddress() { } - wxIPV6address(const wxIPV6address& other) : wxIPaddress(other) { } - // implement wxSockAddress pure virtuals: virtual Family Type() wxOVERRIDE { return IPV6; } virtual wxSockAddress *Clone() const wxOVERRIDE { return new wxIPV6address(*this); } @@ -192,9 +179,6 @@ private: class WXDLLIMPEXP_NET wxUNIXaddress : public wxSockAddress { public: - wxUNIXaddress() : wxSockAddress() { } - wxUNIXaddress(const wxUNIXaddress& other) : wxSockAddress(other) { } - void Filename(const wxString& name); wxString Filename() const; diff --git a/include/wx/string.h b/include/wx/string.h index 6e579ed616..64f424b71d 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -911,8 +911,6 @@ public: public: iterator() {} - iterator(const iterator& i) : m_cur(i.m_cur) {} - reference operator*() { return wxUniCharRef::CreateForString(m_cur); } @@ -946,7 +944,6 @@ public: public: const_iterator() {} - const_iterator(const const_iterator& i) : m_cur(i.m_cur) {} const_iterator(const iterator& i) : m_cur(i.m_cur) {} const_reference operator*() const @@ -1015,8 +1012,6 @@ public: reverse_iterator_impl() {} reverse_iterator_impl(iterator_type i) : m_cur(i) {} - reverse_iterator_impl(const reverse_iterator_impl& ri) - : m_cur(ri.m_cur) {} iterator_type base() const { return m_cur; } diff --git a/include/wx/unichar.h b/include/wx/unichar.h index a0cc71937b..43f8cc985e 100644 --- a/include/wx/unichar.h +++ b/include/wx/unichar.h @@ -144,7 +144,6 @@ public: bool operator&&(bool v) const { return (bool)*this && v; } // Assignment operators: - wxUniChar& operator=(const wxUniChar& c) { if (&c != this) m_value = c.m_value; return *this; } wxUniChar& operator=(const wxUniCharRef& c); wxUniChar& operator=(char c) { m_value = From8bit(c); return *this; } wxUniChar& operator=(unsigned char c) { m_value = From8bit((char)c); return *this; } diff --git a/include/wx/vector.h b/include/wx/vector.h index c15d1630a6..e05920f985 100644 --- a/include/wx/vector.h +++ b/include/wx/vector.h @@ -194,7 +194,6 @@ public: reverse_iterator() : m_ptr(NULL) { } explicit reverse_iterator(iterator it) : m_ptr(it) { } - reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } pointer operator->() const { return m_ptr; } diff --git a/src/common/geometry.cpp b/src/common/geometry.cpp index 3f1cd03a89..57bdcb40c7 100644 --- a/src/common/geometry.cpp +++ b/src/common/geometry.cpp @@ -138,15 +138,6 @@ void wxRect2DDouble::ConstrainTo( const wxRect2DDouble &rect ) SetTop( rect.GetTop() ); } -wxRect2DDouble& wxRect2DDouble::operator=( const wxRect2DDouble &r ) -{ - m_x = r.m_x; - m_y = r.m_y; - m_width = r.m_width; - m_height = r.m_height; - return *this; -} - // integer version // for the following calculations always remember