added missing consts and pass objects by const reference instead of by value (patch 1205869)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-09-24 21:43:15 +00:00
parent 68bc51a9ed
commit fbfb8bcc3f
111 changed files with 199 additions and 197 deletions

View File

@@ -49,9 +49,9 @@ public:
{ if (*this == brush) return (*this); Ref(brush); return *this; }
// comparison
bool operator == (const wxBrush& brush)
bool operator == (const wxBrush& brush) const
{ return m_refData == brush.m_refData; }
bool operator != (const wxBrush& brush)
bool operator != (const wxBrush& brush) const
{ return m_refData != brush.m_refData; }
// accessors

View File

@@ -57,8 +57,8 @@ public:
virtual bool Ok() const { return m_refData ; }
inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; }
inline bool operator == (const wxCursor& cursor) { return m_refData == cursor.m_refData; }
inline bool operator != (const wxCursor& cursor) { return m_refData != cursor.m_refData; }
inline bool operator == (const wxCursor& cursor) const { return m_refData == cursor.m_refData; }
inline bool operator != (const wxCursor& cursor) const { return m_refData != cursor.m_refData; }
inline WX_NSCursor GetNSCursor() const
{

View File

@@ -39,9 +39,9 @@ public:
inline wxPen& operator = (const wxPen& pen)
{ if (*this == pen) return (*this); Ref(pen); return *this; }
inline bool operator == (const wxPen& pen)
inline bool operator == (const wxPen& pen) const
{ return m_refData == pen.m_refData; }
inline bool operator != (const wxPen& pen)
inline bool operator != (const wxPen& pen) const
{ return m_refData != pen.m_refData; }
virtual bool Ok() const { return (m_refData != NULL) ; }

View File

@@ -400,8 +400,8 @@ public: \
{ reverse_iterator tmp = *this; --m_ptr; return tmp; } \
itor& operator--() { ++m_ptr; return *this; } \
const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }\
bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } \
bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } \
bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }\
bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }\
}; \
\
class const_reverse_iterator \
@@ -433,8 +433,8 @@ public: \
{ itor tmp = *this; --m_ptr; return tmp; } \
itor& operator--() { ++m_ptr; return *this; } \
const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }\
bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } \
bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } \
bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }\
bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }\
}; \
\
name(size_type n, const_reference v) { assign(n, v); } \

View File

@@ -57,7 +57,7 @@ public:
void DrawSunkenEdge(wxDC& dc, const wxRect& rect, int borderSize = 1);
// Tile a bitmap
bool TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap);
bool TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap);
protected:
wxColour m_highlightColour; // Usually white

View File

@@ -1088,7 +1088,7 @@ public:
wxSize GetSize() const { return m_size; }
wxRect GetRect() const { return m_rect; }
void SetRect(wxRect rect) { m_rect = rect; }
void SetRect(const wxRect& rect) { m_rect = rect; }
virtual wxEvent *Clone() const { return new wxSizeEvent(*this); }
@@ -1128,7 +1128,7 @@ public:
wxPoint GetPosition() const { return m_pos; }
void SetPosition(const wxPoint& pos) { m_pos = pos; }
wxRect GetRect() const { return m_rect; }
void SetRect(wxRect rect) { m_rect = rect; }
void SetRect(const wxRect& rect) { m_rect = rect; }
virtual wxEvent *Clone() const { return new wxMoveEvent(*this); }

View File

@@ -200,7 +200,7 @@ private:
void CleanUp();
// parse the whole file
void Parse(wxTextBuffer& buffer, bool bLocal);
void Parse(const wxTextBuffer& buffer, bool bLocal);
// the same as SetPath("/")
void SetRootPath();

View File

@@ -195,7 +195,7 @@ public:
void SetStyle(wxFontStyle style);
void SetWeight(wxFontWeight weight);
void SetUnderlined(bool underlined);
void SetFaceName(wxString facename);
void SetFaceName(const wxString& facename);
void SetFamily(wxFontFamily family);
void SetEncoding(wxFontEncoding encoding);

View File

@@ -213,10 +213,10 @@ public:
bool operator==(const wxSize& sz) const { return x == sz.x && y == sz.y; }
bool operator!=(const wxSize& sz) const { return x != sz.x || y != sz.y; }
wxSize operator+(const wxSize& sz) { return wxSize(x + sz.x, y + sz.y); }
wxSize operator-(const wxSize& sz) { return wxSize(x - sz.x, y - sz.y); }
wxSize operator/(const int i) { return wxSize(x / i, y / i); }
wxSize operator*(const int i) { return wxSize(x * i, y * i); }
wxSize operator+(const wxSize& sz) const { return wxSize(x + sz.x, y + sz.y); }
wxSize operator-(const wxSize& sz) const { return wxSize(x - sz.x, y - sz.y); }
wxSize operator/(int i) const { return wxSize(x / i, y / i); }
wxSize operator*(int i) const { return wxSize(x * i, y * i); }
wxSize& operator+=(const wxSize& sz) { x += sz.x; y += sz.y; return *this; }
wxSize& operator-=(const wxSize& sz) { x -= sz.x; y -= sz.y; return *this; }

View File

@@ -180,13 +180,13 @@ public:
protected:
// set the text colours before drawing
void SetTextColoursAndFont(wxGrid& grid,
wxGridCellAttr& attr,
void SetTextColoursAndFont(const wxGrid& grid,
const wxGridCellAttr& attr,
wxDC& dc,
bool isSelected);
// calc the string extent for given string/font
wxSize DoGetBestSize(wxGridCellAttr& attr,
wxSize DoGetBestSize(const wxGridCellAttr& attr,
wxDC& dc,
const wxString& text);
};
@@ -212,7 +212,7 @@ public:
{ return new wxGridCellNumberRenderer; }
protected:
wxString GetString(wxGrid& grid, int row, int col);
wxString GetString(const wxGrid& grid, int row, int col);
};
class WXDLLIMPEXP_ADV wxGridCellFloatRenderer : public wxGridCellStringRenderer
@@ -245,7 +245,7 @@ public:
virtual wxGridCellRenderer *Clone() const;
protected:
wxString GetString(wxGrid& grid, int row, int col);
wxString GetString(const wxGrid& grid, int row, int col);
private:
// formatting parameters
@@ -1175,7 +1175,7 @@ public:
//
void StringToLines( const wxString& value, wxArrayString& lines );
void GetTextBoxSize( wxDC& dc,
void GetTextBoxSize( const wxDC& dc,
const wxArrayString& lines,
long *width, long *height );

View File

@@ -28,8 +28,8 @@
class WXDLLIMPEXP_ADV wxGridCellDateTimeRenderer : public wxGridCellStringRenderer
{
public:
wxGridCellDateTimeRenderer(wxString outformat = wxDefaultDateTimeFormat,
wxString informat = wxDefaultDateTimeFormat);
wxGridCellDateTimeRenderer(const wxString& outformat = wxDefaultDateTimeFormat,
const wxString& informat = wxDefaultDateTimeFormat);
// draw the string right aligned
virtual void Draw(wxGrid& grid,
@@ -50,7 +50,7 @@ public:
virtual void SetParameters(const wxString& params);
protected:
wxString GetString(wxGrid& grid, int row, int col);
wxString GetString(const wxGrid& grid, int row, int col);
wxString m_iformat;
wxString m_oformat;
@@ -85,7 +85,7 @@ public:
virtual void SetParameters(const wxString& params);
protected:
wxString GetString(wxGrid& grid, int row, int col);
wxString GetString(const wxGrid& grid, int row, int col);
wxArrayString m_choices;
};
@@ -149,7 +149,7 @@ public:
private:
wxArrayString GetTextLines( wxGrid& grid,
wxDC& dc,
wxGridCellAttr& attr,
const wxGridCellAttr& attr,
const wxRect& rect,
int row, int col);

View File

@@ -38,8 +38,8 @@ class WXDLLIMPEXP_CORE wxPalette: public wxPaletteBase
wxPalette( const wxPalette& palette );
~wxPalette();
wxPalette& operator = ( const wxPalette& palette );
bool operator == ( const wxPalette& palette );
bool operator != ( const wxPalette& palette );
bool operator == ( const wxPalette& palette ) const;
bool operator != ( const wxPalette& palette ) const;
virtual bool Ok() const;
bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);

View File

@@ -44,8 +44,8 @@ public:
bool Ok() const { return m_refData != NULL; }
bool operator == ( const wxRegionGeneric& region );
bool operator != ( const wxRegionGeneric& region ) { return !(*this == region); }
bool operator == ( const wxRegionGeneric& region ) const;
bool operator != ( const wxRegionGeneric& region ) const { return !(*this == region); }
//# Modify region
// Clear current region

View File

@@ -47,7 +47,7 @@ public:
wxString GetValue() const { return m_value; }
#if wxUSE_VALIDATORS
void SetTextValidator( wxTextValidator& validator );
void SetTextValidator( const wxTextValidator& validator );
void SetTextValidator( long style = wxFILTER_NONE );
wxTextValidator* GetTextValidator() { return (wxTextValidator*)m_textctrl->GetValidator(); }
#endif

View File

@@ -627,9 +627,9 @@ public:
m_width *= ((wxDouble)num)/((wxDouble)denum); m_height *= ((wxDouble)num)/((wxDouble)denum);}
wxRect2DDouble& operator = (const wxRect2DDouble& rect);
inline bool operator == (const wxRect2DDouble& rect)
inline bool operator == (const wxRect2DDouble& rect) const
{ return (m_x==rect.m_x && m_y==rect.m_y && m_width==rect.m_width && m_height==rect.m_height); }
inline bool operator != (const wxRect2DDouble& rect)
inline bool operator != (const wxRect2DDouble& rect) const
{ return !(*this == rect); }
wxDouble m_x;

View File

@@ -87,8 +87,8 @@ public:
bool Ok() const { return m_refData != NULL; }
bool operator == ( const wxRegion& region );
bool operator != ( const wxRegion& region ) { return !(*this == region); }
bool operator == ( const wxRegion& region ) const;
bool operator != ( const wxRegion& region ) const { return !(*this == region); }
void Clear();

View File

@@ -87,8 +87,8 @@ public:
bool Ok() const { return m_refData != NULL; }
bool operator == ( const wxRegion& region );
bool operator != ( const wxRegion& region ) { return !(*this == region); }
bool operator == ( const wxRegion& region ) const;
bool operator != ( const wxRegion& region ) const { return !(*this == region); }
void Clear();

View File

@@ -333,7 +333,7 @@ protected:
class WXDLLIMPEXP_HTML wxHtmlWordCell : public wxHtmlCell
{
public:
wxHtmlWordCell(const wxString& word, wxDC& dc);
wxHtmlWordCell(const wxString& word, const wxDC& dc);
void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
wxHtmlRenderingInfo& info);
wxCursor GetCursor() const;
@@ -343,8 +343,8 @@ public:
void SetPreviousWord(wxHtmlWordCell *cell);
protected:
void SetSelectionPrivPos(wxDC& dc, wxHtmlSelection *s) const;
void Split(wxDC& dc,
void SetSelectionPrivPos(const wxDC& dc, wxHtmlSelection *s) const;
void Split(const wxDC& dc,
const wxPoint& selFrom, const wxPoint& selTo,
unsigned& pos1, unsigned& pos2) const;

View File

@@ -99,7 +99,7 @@ public:
// handler can handle only 'myitems' (e.g. it's GetSupportedTags returns "MYITEMS")
// you can call PushTagHandler(handler, "IT") when you find <myitems>
// and call PopTagHandler() when you find </myitems>
void PushTagHandler(wxHtmlTagHandler *handler, wxString tags);
void PushTagHandler(wxHtmlTagHandler *handler, const wxString& tags);
// Restores state before last call to PushTagHandler
void PopTagHandler();

View File

@@ -123,7 +123,7 @@ public:
#endif // wxUSE_STATUSBAR
// Sets fonts to be used when displaying HTML page.
void SetFonts(wxString normal_face, wxString fixed_face,
void SetFonts(const wxString& normal_face, const wxString& fixed_face,
const int *sizes = NULL);
// Sets font sizes to be relative to the given size or the system

View File

@@ -53,7 +53,7 @@ public:
void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = true);
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL);
void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = NULL);
// Sets font sizes to be relative to the given size or the system
// default size; use either specified or default font
@@ -143,7 +143,7 @@ public:
// You can set different header/footer for odd and even pages
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL);
void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = NULL);
// Sets font sizes to be relative to the given size or the system
// default size; use either specified or default font
@@ -242,7 +242,7 @@ public:
// pg is one of wxPAGE_ODD, wxPAGE_EVEN and wx_PAGE_ALL constants.
// You can set different header/footer for odd and even pages
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = 0);
void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = 0);
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used)
// Sets font sizes to be relative to the given size or the system

View File

@@ -65,7 +65,7 @@ public:
wxHtmlWindow *GetWindow() {return m_Window;}
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL);
void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = NULL);
// Sets font sizes to be relative to the given size or the system
// default size; use either specified or default font

View File

@@ -48,7 +48,7 @@ class WXDLLIMPEXP_BASE wxConnectionBase: public wxObject
public:
wxConnectionBase(wxChar *buffer, int size); // use external buffer
wxConnectionBase(); // use internal, adaptive buffer
wxConnectionBase(wxConnectionBase& copy);
wxConnectionBase(const wxConnectionBase& copy);
~wxConnectionBase(void);
void SetConnected( bool c ) { m_connected = c; }

View File

@@ -33,9 +33,9 @@ public:
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
{ if (*this == accel) return (*this); Ref(accel); return *this; }
bool operator == (const wxAcceleratorTable& accel)
bool operator == (const wxAcceleratorTable& accel) const
{ return m_refData == accel.m_refData; }
bool operator != (const wxAcceleratorTable& accel)
bool operator != (const wxAcceleratorTable& accel) const
{ return m_refData != accel.m_refData; }
bool Ok() const;

View File

@@ -49,9 +49,9 @@ public:
wxBrush& operator = (const wxBrush& brush)
{ if (*this == brush) return (*this); Ref(brush); return *this; }
bool operator == (const wxBrush& brush)
bool operator == (const wxBrush& brush) const
{ return m_refData == brush.m_refData; }
bool operator != (const wxBrush& brush)
bool operator != (const wxBrush& brush) const
{ return m_refData != brush.m_refData; }
wxMacBrushKind MacGetBrushKind() const ;

View File

@@ -34,7 +34,7 @@ public:
wxFontData& GetFontData() { return m_fontData; }
bool IsShown() const;
void OnPanelClose();
void SetData(wxFontData& data);
void SetData(const wxFontData& data);
protected:
wxWindow* m_dialogParent;

View File

@@ -64,8 +64,8 @@ public:
// Operators
inline wxMetafile& operator = (const wxMetafile& metafile) { if (*this == metafile) return (*this); Ref(metafile); return *this; }
inline bool operator == (const wxMetafile& metafile) { return m_refData == metafile.m_refData; }
inline bool operator != (const wxMetafile& metafile) { return m_refData != metafile.m_refData; }
inline bool operator == (const wxMetafile& metafile) const { return m_refData == metafile.m_refData; }
inline bool operator != (const wxMetafile& metafile) const { return m_refData != metafile.m_refData; }
protected:
};

View File

@@ -51,8 +51,8 @@ public:
virtual bool Ok() const { return (m_refData != NULL) ; }
inline wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; }
inline bool operator == (const wxPalette& palette) { return m_refData == palette.m_refData; }
inline bool operator != (const wxPalette& palette) { return m_refData != palette.m_refData; }
inline bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; }
inline bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; }
/* TODO: implementation
inline WXHPALETTE GetHPALETTE() const { return (M_PALETTEDATA ? M_PALETTEDATA->m_hPalette : 0); }

View File

@@ -58,8 +58,8 @@ public:
~wxPen();
inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
inline bool operator == (const wxPen& pen) { return m_refData == pen.m_refData; }
inline bool operator != (const wxPen& pen) { return m_refData != pen.m_refData; }
inline bool operator == (const wxPen& pen) const { return m_refData == pen.m_refData; }
inline bool operator != (const wxPen& pen) const { return m_refData != pen.m_refData; }
virtual bool Ok() const { return (m_refData != NULL) ; }

View File

@@ -753,7 +753,7 @@ private :
// toplevel.cpp
ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow, Point location , WindowRef window , ControlPartCode *outPart ) ;
ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow, const Point& location , WindowRef window , ControlPartCode *outPart ) ;
#endif // wxUSE_GUI

View File

@@ -33,9 +33,9 @@ public:
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
{ if (*this == accel) return (*this); Ref(accel); return *this; }
bool operator == (const wxAcceleratorTable& accel)
bool operator == (const wxAcceleratorTable& accel) const
{ return m_refData == accel.m_refData; }
bool operator != (const wxAcceleratorTable& accel)
bool operator != (const wxAcceleratorTable& accel) const
{ return m_refData != accel.m_refData; }
bool Ok() const;

View File

@@ -49,9 +49,9 @@ public:
wxBrush& operator = (const wxBrush& brush)
{ if (*this == brush) return (*this); Ref(brush); return *this; }
bool operator == (const wxBrush& brush)
bool operator == (const wxBrush& brush) const
{ return m_refData == brush.m_refData; }
bool operator != (const wxBrush& brush)
bool operator != (const wxBrush& brush) const
{ return m_refData != brush.m_refData; }
wxMacBrushKind MacGetBrushKind() const ;

View File

@@ -64,8 +64,8 @@ public:
virtual bool Ok() const { return (m_refData != NULL && ( M_CURSORDATA->m_hCursor != NULL || M_CURSORDATA->m_themeCursor != -1 ) ) ; }
inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; }
inline bool operator == (const wxCursor& cursor) { return m_refData == cursor.m_refData; }
inline bool operator != (const wxCursor& cursor) { return m_refData != cursor.m_refData; }
inline bool operator == (const wxCursor& cursor) const { return m_refData == cursor.m_refData; }
inline bool operator != (const wxCursor& cursor) const { return m_refData != cursor.m_refData; }
void MacInstall() const ;

View File

@@ -75,8 +75,8 @@ public:
// Operators
inline wxMetafile& operator = (const wxMetafile& metafile) { if (*this == metafile) return (*this); Ref(metafile); return *this; }
inline bool operator == (const wxMetafile& metafile) { return m_refData == metafile.m_refData; }
inline bool operator != (const wxMetafile& metafile) { return m_refData != metafile.m_refData; }
inline bool operator == (const wxMetafile& metafile) const { return m_refData == metafile.m_refData; }
inline bool operator != (const wxMetafile& metafile) const { return m_refData != metafile.m_refData; }
protected:
};

View File

@@ -51,8 +51,8 @@ public:
virtual bool Ok() const { return (m_refData != NULL) ; }
inline wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; }
inline bool operator == (const wxPalette& palette) { return m_refData == palette.m_refData; }
inline bool operator != (const wxPalette& palette) { return m_refData != palette.m_refData; }
inline bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; }
inline bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; }
/* TODO: implementation
inline WXHPALETTE GetHPALETTE() const { return (M_PALETTEDATA ? M_PALETTEDATA->m_hPalette : 0); }

View File

@@ -58,8 +58,8 @@ public:
~wxPen();
inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
inline bool operator == (const wxPen& pen) { return m_refData == pen.m_refData; }
inline bool operator != (const wxPen& pen) { return m_refData != pen.m_refData; }
inline bool operator == (const wxPen& pen) const { return m_refData == pen.m_refData; }
inline bool operator != (const wxPen& pen) const { return m_refData != pen.m_refData; }
virtual bool Ok() const { return (m_refData != NULL) ; }

View File

@@ -48,8 +48,8 @@ public:
void SetValue(int col, int row, double value);
void operator = (const wxTransformMatrix& mat);
bool operator == (const wxTransformMatrix& mat);
bool operator != (const wxTransformMatrix& mat);
bool operator == (const wxTransformMatrix& mat) const;
bool operator != (const wxTransformMatrix& mat) const;
//multiply every element by t
wxTransformMatrix& operator*=(const double& t);

View File

@@ -31,8 +31,8 @@ public:
~wxAcceleratorTable();
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if (*this == accel) return (*this); Ref(accel); return *this; }
bool operator == (const wxAcceleratorTable& accel) { return m_refData == accel.m_refData; }
bool operator != (const wxAcceleratorTable& accel) { return m_refData != accel.m_refData; }
bool operator == (const wxAcceleratorTable& accel) const { return m_refData == accel.m_refData; }
bool operator != (const wxAcceleratorTable& accel) const { return m_refData != accel.m_refData; }
bool Ok() const;

View File

@@ -120,7 +120,7 @@ public:
bool GetColumn(int col, wxListItem& item) const;
// Sets information about this column
bool SetColumn(int col, wxListItem& item) ;
bool SetColumn(int col, const wxListItem& item) ;
// Gets the column width
int GetColumnWidth(int col) const;
@@ -298,7 +298,7 @@ public:
// Inserts an item, returning the index of the new item if successful,
// -1 otherwise.
long InsertItem(wxListItem& info);
long InsertItem(const wxListItem& info);
// Insert a string item
long InsertItem(long index, const wxString& label);
@@ -310,7 +310,7 @@ public:
long InsertItem(long index, const wxString& label, int imageIndex);
// For list view mode (only), inserts a column.
long InsertColumn(long col, wxListItem& info);
long InsertColumn(long col, const wxListItem& info);
long InsertColumn(long col,
const wxString& heading,

View File

@@ -138,7 +138,7 @@ protected:
wxSocketBase *GetActivePort();
// helper for GetPort()
wxString GetPortCmdArgument(wxIPV4address Local, wxIPV4address New);
wxString GetPortCmdArgument(const wxIPV4address& Local, const wxIPV4address& New);
// accept connection from server in active mode, returns the same socket as
// passed in in passive mode

View File

@@ -104,7 +104,7 @@ public:
virtual int Type() { return wxSockAddress::IPV4; }
virtual wxSockAddress *Clone() const;
bool operator==(wxIPV4address& addr);
bool operator==(const wxIPV4address& addr) const;
private:
wxString m_origHostname;

View File

@@ -184,7 +184,7 @@ public:
virtual wxSize GetSize() const;
virtual wxSize CalcMin();
virtual void SetDimension( wxPoint pos, wxSize size );
virtual void SetDimension( const wxPoint& pos, const wxSize& size );
wxSize GetMinSize() const
{ return m_minSize; }
@@ -406,24 +406,24 @@ public:
void SetMinSize( int width, int height )
{ DoSetMinSize( width, height ); }
void SetMinSize( wxSize size )
void SetMinSize( const wxSize& size )
{ DoSetMinSize( size.x, size.y ); }
// Searches recursively
bool SetItemMinSize( wxWindow *window, int width, int height )
{ return DoSetItemMinSize( window, width, height ); }
bool SetItemMinSize( wxWindow *window, wxSize size )
bool SetItemMinSize( wxWindow *window, const wxSize& size )
{ return DoSetItemMinSize( window, size.x, size.y ); }
// Searches recursively
bool SetItemMinSize( wxSizer *sizer, int width, int height )
{ return DoSetItemMinSize( sizer, width, height ); }
bool SetItemMinSize( wxSizer *sizer, wxSize size )
bool SetItemMinSize( wxSizer *sizer, const wxSize& size )
{ return DoSetItemMinSize( sizer, size.x, size.y ); }
bool SetItemMinSize( size_t index, int width, int height )
{ return DoSetItemMinSize( index, width, height ); }
bool SetItemMinSize( size_t index, wxSize size )
bool SetItemMinSize( size_t index, const wxSize& size )
{ return DoSetItemMinSize( index, size.x, size.y ); }
wxSize GetSize() const

View File

@@ -230,7 +230,7 @@ class WXDLLIMPEXP_NET wxSocketServer : public wxSocketBase
DECLARE_CLASS(wxSocketServer)
public:
wxSocketServer(wxSockAddress& addr, wxSocketFlags flags = wxSOCKET_NONE);
wxSocketServer(const wxSockAddress& addr, wxSocketFlags flags = wxSOCKET_NONE);
wxSocketBase* Accept(bool wait = true);
bool AcceptWith(wxSocketBase& socket, bool wait = true);
@@ -272,12 +272,12 @@ class WXDLLIMPEXP_NET wxDatagramSocket : public wxSocketBase
DECLARE_CLASS(wxDatagramSocket)
public:
wxDatagramSocket(wxSockAddress& addr, wxSocketFlags flags = wxSOCKET_NONE);
wxDatagramSocket(const wxSockAddress& addr, wxSocketFlags flags = wxSOCKET_NONE);
wxDatagramSocket& RecvFrom( wxSockAddress& addr,
void* buf,
wxUint32 nBytes );
wxDatagramSocket& SendTo( wxSockAddress& addr,
wxDatagramSocket& SendTo( const wxSockAddress& addr,
const void* buf,
wxUint32 nBytes );

View File

@@ -31,7 +31,7 @@ WXDLLEXPORT bool wxIsStockLabel(wxWindowID id, const wxString& label);
// for wxSTOCK_OK):
WXDLLEXPORT wxString wxGetStockLabel(wxWindowID id,
bool withCodes = true,
wxString accelerator = wxEmptyString);
const wxString& accelerator = wxEmptyString);
#ifdef __WXGTK20__
// Translates stock ID to GTK+'s stock item string indentifier:

View File

@@ -87,8 +87,8 @@ public:
bool Ok() const { return m_refData != NULL; }
bool operator == ( const wxRegion& region );
bool operator != ( const wxRegion& region ) { return !(*this == region); }
bool operator == ( const wxRegion& region ) const;
bool operator != ( const wxRegion& region ) const { return !(*this == region); }
void Clear();