great copy ctor/assignment operators cleanup by Paul Cornett (patch 1307665)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -78,11 +78,9 @@ public:
|
||||
wxBitmap( const char bits[], int width, int height, int depth = 1 );
|
||||
wxBitmap( const char **bits ) { (void)CreateFromXpm(bits); }
|
||||
wxBitmap( char **bits ) { (void)CreateFromXpm((const char **)bits); }
|
||||
wxBitmap( const wxBitmap& bmp );
|
||||
wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM );
|
||||
virtual ~wxBitmap();
|
||||
|
||||
wxBitmap& operator = ( const wxBitmap& bmp );
|
||||
bool operator == ( const wxBitmap& bmp ) const;
|
||||
bool operator != ( const wxBitmap& bmp ) const;
|
||||
bool Ok() const;
|
||||
|
@@ -35,9 +35,6 @@ public:
|
||||
wxBrush( const wxBitmap &stippleBitmap );
|
||||
~wxBrush();
|
||||
|
||||
wxBrush( const wxBrush &brush ) { Ref(brush); }
|
||||
wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; }
|
||||
|
||||
bool Ok() const { return m_refData != NULL; }
|
||||
|
||||
bool operator == ( const wxBrush& brush ) const;
|
||||
|
@@ -58,9 +58,6 @@ public:
|
||||
// Get colour from name or wxNullColour
|
||||
static wxColour CreateByName(const wxString& name);
|
||||
|
||||
wxColour( const wxColour& col ) { Ref(col); }
|
||||
wxColour& operator = ( const wxColour& col ) { Ref(col); return *this; }
|
||||
|
||||
~wxColour();
|
||||
|
||||
bool Ok() const { return m_refData != NULL; }
|
||||
|
@@ -28,7 +28,6 @@ public:
|
||||
|
||||
wxCursor();
|
||||
wxCursor( int cursorId );
|
||||
wxCursor( const wxCursor &cursor );
|
||||
#if wxUSE_IMAGE
|
||||
wxCursor( const wxImage & image );
|
||||
#endif
|
||||
@@ -36,7 +35,6 @@ public:
|
||||
int hotSpotX=-1, int hotSpotY=-1,
|
||||
const char maskBits[]=0, wxColour *fg=0, wxColour *bg=0 );
|
||||
~wxCursor();
|
||||
wxCursor& operator = ( const wxCursor& cursor );
|
||||
bool operator == ( const wxCursor& cursor ) const;
|
||||
bool operator != ( const wxCursor& cursor ) const;
|
||||
bool Ok() const;
|
||||
|
@@ -19,8 +19,7 @@ class WXDLLIMPEXP_CORE wxFont : public wxFontBase
|
||||
{
|
||||
public:
|
||||
// ctors and such
|
||||
wxFont() { Init(); }
|
||||
wxFont(const wxFont& font) { Init(); Ref(font); }
|
||||
wxFont() { }
|
||||
|
||||
wxFont(int size,
|
||||
int family,
|
||||
@@ -30,8 +29,6 @@ public:
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(size, family, style, weight, underlined, face, encoding);
|
||||
}
|
||||
|
||||
@@ -56,9 +53,6 @@ public:
|
||||
|
||||
virtual ~wxFont();
|
||||
|
||||
// assignment
|
||||
wxFont& operator=(const wxFont& font);
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual int GetPointSize() const;
|
||||
virtual int GetFamily() const;
|
||||
@@ -109,9 +103,6 @@ public:
|
||||
protected:
|
||||
virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
void Unshare();
|
||||
|
||||
private:
|
||||
|
@@ -22,7 +22,6 @@ class WXDLLIMPEXP_CORE wxIcon: public wxBitmap
|
||||
{
|
||||
public:
|
||||
wxIcon();
|
||||
wxIcon( const wxIcon& icon);
|
||||
wxIcon( const char **bits, int width=-1, int height=-1 );
|
||||
|
||||
// For compatibility with wxMSW where desired size is sometimes required to
|
||||
@@ -39,7 +38,6 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
wxIcon& operator=(const wxIcon& icon);
|
||||
bool operator==(const wxIcon& icon) const { return m_refData == icon.m_refData; }
|
||||
bool operator!=(const wxIcon& icon) const { return !(*this == icon); }
|
||||
|
||||
|
@@ -51,7 +51,6 @@ class WXDLLEXPORT wxPalette: public wxPaletteBase
|
||||
|
||||
public:
|
||||
wxPalette();
|
||||
wxPalette(const wxPalette& palette) { Ref(palette); }
|
||||
|
||||
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||
~wxPalette();
|
||||
@@ -61,7 +60,6 @@ public:
|
||||
|
||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||
|
||||
wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; }
|
||||
bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; }
|
||||
bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; }
|
||||
|
||||
|
@@ -38,9 +38,6 @@ public:
|
||||
wxPen( const wxBitmap &stipple, int width );
|
||||
~wxPen();
|
||||
|
||||
wxPen( const wxPen& pen ) { Ref(pen); }
|
||||
wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
|
||||
|
||||
bool Ok() const { return m_refData != NULL; }
|
||||
|
||||
bool operator == ( const wxPen& pen ) const;
|
||||
|
@@ -82,9 +82,6 @@ public:
|
||||
|
||||
~wxRegion();
|
||||
|
||||
wxRegion( const wxRegion& region ) { Ref(region); }
|
||||
wxRegion& operator = ( const wxRegion& region ) { Ref(region); return *this; }
|
||||
|
||||
bool Ok() const { return m_refData != NULL; }
|
||||
|
||||
bool operator == ( const wxRegion& region ) const;
|
||||
|
Reference in New Issue
Block a user