]> git.saurik.com Git - wxWidgets.git/commitdiff
added missing consts and pass objects by const reference instead of by value (patch...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Sep 2005 21:43:15 +0000 (21:43 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Sep 2005 21:43:15 +0000 (21:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

111 files changed:
docs/latex/wx/function.tex
docs/latex/wx/htdcrend.tex
docs/latex/wx/hteasypr.tex
docs/latex/wx/htparser.tex
docs/latex/wx/htprint.tex
docs/latex/wx/htwindow.tex
docs/latex/wx/htwinprs.tex
docs/latex/wx/sizer.tex
docs/latex/wx/sizeritem.tex
docs/latex/wx/socksrv.tex
include/wx/cocoa/brush.h
include/wx/cocoa/cursor.h
include/wx/cocoa/pen.h
include/wx/dynarray.h
include/wx/effects.h
include/wx/event.h
include/wx/fileconf.h
include/wx/fontutil.h
include/wx/gdicmn.h
include/wx/generic/grid.h
include/wx/generic/gridctrl.h
include/wx/generic/paletteg.h
include/wx/generic/region.h
include/wx/generic/textdlgg.h
include/wx/geometry.h
include/wx/gtk/region.h
include/wx/gtk1/region.h
include/wx/html/htmlcell.h
include/wx/html/htmlpars.h
include/wx/html/htmlwin.h
include/wx/html/htmprint.h
include/wx/html/winpars.h
include/wx/ipcbase.h
include/wx/mac/carbon/accel.h
include/wx/mac/carbon/brush.h
include/wx/mac/carbon/fontdlg.h
include/wx/mac/carbon/metafile.h
include/wx/mac/carbon/palette.h
include/wx/mac/carbon/pen.h
include/wx/mac/carbon/private.h
include/wx/mac/classic/accel.h
include/wx/mac/classic/brush.h
include/wx/mac/classic/cursor.h
include/wx/mac/classic/metafile.h
include/wx/mac/classic/palette.h
include/wx/mac/classic/pen.h
include/wx/matrix.h
include/wx/motif/accel.h
include/wx/msw/listctrl.h
include/wx/protocol/ftp.h
include/wx/sckaddr.h
include/wx/sizer.h
include/wx/socket.h
include/wx/stockitem.h
include/wx/x11/region.h
samples/dnd/dnd.cpp
samples/docview/doc.cpp
samples/docview/doc.h
samples/docvwmdi/doc.cpp
samples/docvwmdi/doc.h
samples/layout/layout.cpp
samples/ownerdrw/ownerdrw.cpp
samples/printing/printing.cpp
samples/printing/printing.h
samples/regtest/regtest.cpp
src/common/cmdline.cpp
src/common/effects.cpp
src/common/fileconf.cpp
src/common/fontcmn.cpp
src/common/fs_mem.cpp
src/common/ftp.cpp
src/common/ipcbase.cpp
src/common/matrix.cpp
src/common/sckaddr.cpp
src/common/sizer.cpp
src/common/socket.cpp
src/common/stockitem.cpp
src/generic/grid.cpp
src/generic/gridctrl.cpp
src/generic/htmllbox.cpp
src/generic/listctrl.cpp
src/generic/paletteg.cpp
src/generic/regiong.cpp
src/generic/textdlgg.cpp
src/gtk/filedlg.cpp
src/gtk/region.cpp
src/gtk/textctrl.cpp
src/gtk1/filedlg.cpp
src/gtk1/region.cpp
src/gtk1/textctrl.cpp
src/html/helpfrm.cpp
src/html/htmlcell.cpp
src/html/htmlpars.cpp
src/html/htmlwin.cpp
src/html/htmprint.cpp
src/html/winpars.cpp
src/mac/carbon/fontdlg.cpp
src/mac/carbon/mimetmac.cpp
src/mac/carbon/textctrl.cpp
src/mac/carbon/tooltip.cpp
src/mac/carbon/toplevel.cpp
src/motif/clipbrd.cpp
src/motif/spinbutt.cpp
src/motif/utils.cpp
src/motif/window.cpp
src/msw/font.cpp
src/msw/listctrl.cpp
src/msw/mediactrl.cpp
src/os2/font.cpp
src/unix/fontutil.cpp
src/x11/region.cpp

index 619b25dee1c903de52bc4d2a24684accb0e88035..7e4a4f8599b9e20d4645974f5cd50c222ccaf23c 100644 (file)
@@ -3014,7 +3014,7 @@ See also \helpref{wxWriteResource}{wxwriteresource}, \helpref{wxConfigBase}{wxco
 
 \membersection{::wxGetStockLabel}\label{wxgetstocklabel}
 
-\func{wxString}{wxGetStockLabel}{\param{wxWindowID }{id}, \param{bool }{withCodes = true}, \param{wxString }{accelerator = wxEmptyString}}
+\func{wxString}{wxGetStockLabel}{\param{wxWindowID }{id}, \param{bool }{withCodes = true}, \param{const wxString\& }{accelerator = wxEmptyString}}
 
 Returns label that should be used for given {\it id} element.
 
index 0d1bcd9af5464588ef1be99822c4d0056bd7e265..f7623eb32294809a127a36830c51ed6af3d7c4ee 100644 (file)
@@ -37,7 +37,7 @@ inch wide on typical printer. With pixel\_scale = 3.0 it would be 3 inches.)
 
 \membersection{wxHtmlDCRenderer::SetFonts}\label{wxhtmldcrenderersetfonts}
 
-\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
+\func{void}{SetFonts}{\param{const wxString\& }{normal\_face}, \param{const wxString\& }{fixed\_face}, \param{const int }{*sizes = NULL}}
 
 Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
 detailed description.
index 5418d508527fbb7229c8278b9c202bb546a94a5a..7958055e71bb71ac1820e758d76b2e496f8a4035 100644 (file)
@@ -101,7 +101,7 @@ Display page setup dialog and allows the user to modify settings.
 
 \membersection{wxHtmlEasyPrinting::SetFonts}\label{wxhtmleasyprintingsetfonts}
 
-\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
+\func{void}{SetFonts}{\param{const wxString\& }{normal\_face}, \param{const wxString\& }{fixed\_face}, \param{const int }{*sizes = NULL}}
 
 Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
 detailed description.
index 669bfc14eab0d21260c532bb29ffd4c583f96669..bc373af4be7d1fae66828dedf25457b5263ab87f 100644 (file)
@@ -190,7 +190,7 @@ You shouldn't use InitParser, DoParsing, GetProduct or DoneParser directly.
 
 \membersection{wxHtmlParser::PushTagHandler}\label{wxhtmlparserpushtaghandler}
 
-\func{void}{PushTagHandler}{\param{wxHtmlTagHandler* }{handler}, \param{wxString }{tags}}
+\func{void}{PushTagHandler}{\param{wxHtmlTagHandler* }{handler}, \param{const wxString\& }{tags}}
 
 Forces the handler to handle additional tags 
 (not returned by \helpref{GetSupportedTags}{wxhtmltaghandlergetsupportedtags}). 
index 197a57cd3a99b3178c3b633940537cf88e2ab1f4..15f4ef87a0c78ea82dd660ef7a7e42d60c3d9c16 100644 (file)
@@ -36,7 +36,7 @@ further information.
 
 \membersection{wxHtmlPrintout::SetFonts}\label{wxhtmlprintoutsetfonts}
 
-\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
+\func{void}{SetFonts}{\param{const wxString\& }{normal\_face}, \param{const wxString\& }{fixed\_face}, \param{const int }{*sizes = NULL}}
 
 Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
 detailed description.
index 52bf97972fb5a6d3862540b1e12491e77b7f7c47..01c50a92238c5153309b6788986d7009a0847184 100644 (file)
@@ -354,7 +354,7 @@ This function sets the space between border of window and HTML contents. See ima
 
 \membersection{wxHtmlWindow::SetFonts}\label{wxhtmlwindowsetfonts}
 
-\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
+\func{void}{SetFonts}{\param{const wxString\& }{normal\_face}, \param{const wxString\& }{fixed\_face}, \param{const int }{*sizes = NULL}}
 
 This function sets font sizes and faces.
 
index 5260ccd2d425f70d462b8569b61ce5248af43b05..5a24cf285bf0e79869956ae374570da441e8d392 100644 (file)
@@ -269,7 +269,7 @@ Sets underlined flag of actualfont. {\it x} is either true of false.
 
 \membersection{wxHtmlWinParser::SetFonts}\label{wxhtmlwinparsersetfonts}
 
-\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
+\func{void}{SetFonts}{\param{const wxString\& }{normal\_face}, \param{const wxString\& }{fixed\_face}, \param{const int }{*sizes = NULL}}
 
 Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
 detailed description.
index c871edc5a97379cb3b82b7ec714a5c6773b57920..a0c77ab75748b2903758d97b3bb24ac7d2c5ddae 100644 (file)
@@ -384,7 +384,7 @@ by the sizer to resize themselves according to the rules defined by the paramete
 
 \func{void}{SetMinSize}{\param{int }{width}, \param{int }{height}}
 
-\func{void}{SetMinSize}{\param{wxSize }{size}}
+\func{void}{SetMinSize}{\param{const wxSize\& }{size}}
 
 Call this to give the sizer a minimal size. Normally, the sizer will calculate its
 minimal size based purely on how much space its children need. After calling this
index 745b5964eabd52d345c8d8812770f92fc3e49eb7..885981eaef0ec964a9853ffe61889748ec013060 100644 (file)
@@ -183,7 +183,7 @@ Set the border item attribute.
 
 \membersection{wxSizerItem::SetDimension}\label{wxsizeritemsetdimension}
 
-\func{void}{SetDimension}{\param{wxPoint }{pos}, \param{wxSize }{size}}
+\func{void}{SetDimension}{\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size}}
 
 Set the position and size of the space allocated to the sizer, and
 adjust the position and size of the item to be within that space
index be485c6c6387fdc24887832fa1d47b2dd1105d85..f4e4553fe5ccc58e2265eda1f883f08d3213b2a1 100644 (file)
@@ -32,7 +32,7 @@
 %
 \membersection{wxSocketServer::wxSocketServer}\label{wxsocketserverctor}
 
-\func{}{wxSocketServer}{\param{wxSockAddress\&}{ address}, \param{wxSocketFlags}{ flags = wxSOCKET\_NONE}}
+\func{}{wxSocketServer}{\param{const wxSockAddress\&}{ address}, \param{wxSocketFlags}{ flags = wxSOCKET\_NONE}}
 
 Constructs a new server and tries to bind to the specified {\it address}.
 Before trying to accept new connections, test whether it succeeded with 
index e3d793db541696443505f5924c3d038b0c878e61..728a0ab2deffd413c2eacb2bce63f4221cb5d72f 100644 (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
index c34f16eb8dc894571e05526014e6ba25dc8fb35a..25bd5514552368c1e7e1c35c4805e80a937c5f1d 100644 (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
   {    
index 01d4ef5d91441a1018e981c6157d4e173c195c8f..6608e2c9782b996f6585ec17620de1a8793d25ed 100644 (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) ; }
index 18c1d42702aa29390b3991ea6824353a06b61eae..4aaf0f8b42998a389344db3d7059a6da24b8f194 100644 (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); }              \
index 55f988ff53d25abd1ab590daa5760a95754ef79c..64f7d02eeecd007323952b2aec3b899539650515 100644 (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
index 0ded7cd2da0fe1fe1aba81bce3f355c9161e0ab7..7d6f0a007674f393f23fd24712544b61ca3d4169 100644 (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); }
 
index a3b6391b5aae656bf17a70cc23365d2dba9387a5..79828da710737c55c6f529d4225444edb7dc073e 100644 (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();
index becafbc25ef376921a83ded256fb128d99243424..d2491dcbc534c154f8cd20bb8d7c1910385355f9 100644 (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);
 
index ff28ea2f1c3ad6060e635efd86f0f605818f40ea..5018eece642fb1a86409545215e9ec4b49d55368 100644 (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; }
index 8701a1941b460ca7bb218e79e051c180c6a47b8a..0d73cd15d5e95fc5ed43a217bcaf934b25cdfada 100644 (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 );
 
index a51708b79001611c5ebcad49d89bc1e9da05367b..31849d7d39b02b58596933119cd1e51a6d4844f6 100644 (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);
 
index 438af448c1076baa16187201dcfc0ef855f13981..4f1ee46384b3c2abc3fe441728b9b0afe4a85f4f 100644 (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);
index 1657415892c251cb508d5804417ba6f6d876a67b..1163dc9be7cacca25304f795ac3300e732e3d68d 100644 (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
index 8825d90216a88d23da80a4819efeb02a54897707..b8f4eb474a125f3ae70b7e1f49d122ad5bf6420e 100644 (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
index bf32e5b2b232196fef331256f2a4dd9da3b43315..d38e7ab21065eda9c41f04fa6ac6b791a5b6144e 100644 (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;
index fa396d31e1e5f17fbe2271fc1052a65cbb672e16..f9925be044cbaaa5a56711dd47bfe8e1f06a9c9d 100644 (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();
 
index fa396d31e1e5f17fbe2271fc1052a65cbb672e16..f9925be044cbaaa5a56711dd47bfe8e1f06a9c9d 100644 (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();
 
index a37ac64d5c0472aa57c72c45710df71e5536f506..d1570257cb98072fc4e7a3c34de18a8391eceaa3 100644 (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;
 
index 446fa3cba2ce02add0ddb71eda88e8e14cb21621..d102b6c8dd782661edf2a51ce22533c455d4f5d2 100644 (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();
index 9d961b27d8b8f393e4dc3b28b44668bb92b804fe..57cc3f500b35ddf9468fc5ad0335a7dc9da8d082 100644 (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
index 558f24130f94f6072069978b8e2377d1cbf54662..b407ebeeec90c7ecbc133ff17b4dff5719667aaa 100644 (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
index 783b172052549647746e4ebbf3c192a587da426e..6bd5fa2a6b9bca43db2782e51973de3033305947 100644 (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
index 28fb1f46cbfbfe336f00f9ce809ea0840e7a7806..cfc442eb978d07b6902eb7f3c9988a3f50184def 100644 (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; }
index d68b50d59785231e34da6d4d2f6c818e80976053..6d34d460d8f418288383554b09bf75def75ffbb7 100644 (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;
index c99c10daf0ec7763bbc8f9b3539b2f5a90aea926..2bdfa0fb13e3ef7192a644e6ddfe5d94ef357e7c 100644 (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 ;
index fca0112cac5f63cb71fb7534331369309b2799f1..b69a9fe74cbeec5616409e2821eb23fd419250eb 100644 (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;
index 23a0dc957092b579541b739a1bf6a0b933b220c4..7bf91023d10c7dab99c5a05fed7cd426244400e6 100644 (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:
 };
index 414e7eb315687e5b55b24409c4e82bc083db66cb..04368cb846e2e320fbf306b37f8113ee313fee9a 100644 (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); }
index db2d4ebc539b1793c908934ec5e0f3795497a937..a6055de1881cae000991631dee5d0abc2a4be182 100644 (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) ; }
 
index bc08be5c3d86d71d863063ac974a6be65b7dc677..90e220dee9c51959ebc4214fd33167755f7b1f97 100644 (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
 
index d68b50d59785231e34da6d4d2f6c818e80976053..6d34d460d8f418288383554b09bf75def75ffbb7 100644 (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;
index 16b517550fae93075bfd6195030c165bde897f98..51cf58939cf27ea4ee18c79399e548b82fa3f714 100644 (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 ;
index 2ba5cd064ea06643c1057b62258ae8d5f3ae2b36..2ceb41e9931da5117211d69bc9adb099ef8cc705 100644 (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 ;
 
index 2b528efeca862bfc71ffb87de0281b583e66fc86..7026e1bc54188941b9e9308900bfa82afda5152d 100644 (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:
 };
index 414e7eb315687e5b55b24409c4e82bc083db66cb..04368cb846e2e320fbf306b37f8113ee313fee9a 100644 (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); }
index db2d4ebc539b1793c908934ec5e0f3795497a937..a6055de1881cae000991631dee5d0abc2a4be182 100644 (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) ; }
 
index 67bee817b75fc8b46d660601f5936d9c88a38be8..8061667a3a211fbc23f9cc7198be6ac1effa5c27 100644 (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);
index 901019fca557e85ba9c3a6153c9d22c4d596e2ae..78605a9c4c598e539d242d9f92602b1e1542bc7d 100644 (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;
     
index d7fc57e1ce92aca476c99bf6e0f11a84aaa773d1..308304f7802a2691e6a3a1a282592599798fb623 100644 (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,
index f79c40f1bc9e9671980105986530ec79b4124976..03a1a6ba6903074ba7ac96909cdb836cfc081e6b 100644 (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
index e1ffdb1c84a5fecf46ec7f807c374b48c81b8ffd..98e1c0d4e7b592c28b91a963e91a8b2353737fee 100644 (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;
index 5407125af41e0fd8f2d47fd79ccc20775414ac5a..28965fe97ed880a1cc5d910cd4ce5b35833f5e4f 100644 (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
index cd152bae2e53d4d64ab35c56bc5066234d3d005b..ac1c7d36403f830c8b613c35b9d1bfa376d78dd8 100644 (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 );
 
index 6c1740c64a21ab2160d8138625bc548f59d61029..7d2b21429783470c95384d9a1647d623e906f42a 100644 (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:
index b2e66e71c2d1aa63248fb3bb7bdcd4fcdf9c9ab0..b4c1ce349a69d834c8309fda4365eabe6b426bf5 100644 (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();
 
index a0d8b11dc80ea5db24728891a0c2dcb64bebeeed..acc50c0de1f16faa1c297cd3e8048d493524236e 100644 (file)
@@ -199,7 +199,7 @@ private:
 class DnDFrame : public wxFrame
 {
 public:
-    DnDFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h);
+    DnDFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h);
     virtual ~DnDFrame();
 
     void OnPaint(wxPaintEvent& event);
@@ -920,7 +920,7 @@ bool DnDApp::OnInit()
 
 #if wxUSE_DRAG_AND_DROP || wxUSE_CLIPBOARD
 
-DnDFrame::DnDFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h)
+DnDFrame::DnDFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h)
         : wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h)),
           m_strText(_T("wxWidgets drag & drop works :-)"))
 
index f4b5f587c4ad817bd046df8341f44f6430b76f71..cc045583508e79d3e699bbba8bf7e669e9679a0d 100644 (file)
@@ -119,7 +119,7 @@ wxInputStream& DrawingDocument::LoadObject(wxInputStream& stream)
 }
 #endif
 
-DoodleSegment::DoodleSegment(DoodleSegment& seg):wxObject()
+DoodleSegment::DoodleSegment(const DoodleSegment& seg):wxObject()
 {
     wxList::compatibility_iterator node = seg.lines.GetFirst();
     while (node)
index 516aee30d4659bc7042e38100d23c26d969a66c6..af9b272fbe131fb410b987bec0fe769e1b914b60 100644 (file)
@@ -32,7 +32,7 @@ public:
     wxList lines;
 
     DoodleSegment(void){};
-    DoodleSegment(DoodleSegment& seg);
+    DoodleSegment(const DoodleSegment& seg);
     ~DoodleSegment(void);
 
     void Draw(wxDC *dc);
index eaefcc94681b23355cfbd2bc670468c54cc88e30..292c280f12b3792b9391e135809268ea139d6c3a 100644 (file)
@@ -117,7 +117,7 @@ wxInputStream& DrawingDocument::LoadObject(wxInputStream& stream)
 }
 #endif
 
-DoodleSegment::DoodleSegment(DoodleSegment& seg)
+DoodleSegment::DoodleSegment(const DoodleSegment& seg)
               :wxObject()
 {
   wxList::compatibility_iterator node = seg.lines.GetFirst();
index 600564b785315bec7e0416deab064bfb0c48686b..f68b8a18ea2d563e84bea06baad09ad58f36235b 100644 (file)
@@ -32,7 +32,7 @@ class DoodleSegment: public wxObject
   wxList lines;
 
   DoodleSegment(void){};
-  DoodleSegment(DoodleSegment& seg);
+  DoodleSegment(const DoodleSegment& seg);
   ~DoodleSegment(void);
 
   void Draw(wxDC *dc);
index 99be94d26f56bf74b14e830da263ba8a660acc53..1b00cbbeebc6b18e30a0be95fb4b865ac4be2b9e 100644 (file)
@@ -417,7 +417,7 @@ MySizerDialog::MySizerDialog(wxWindow *parent, const wxChar *title)
 #define POS(r, c)        wxGBPosition(r,c)
 #define SPAN(r, c)       wxGBSpan(r,c)
 
-wxChar* gbsDescription =_T("\
+const wxChar gbsDescription[] =_T("\
 The wxGridBagSizer is similar to the wxFlexGridSizer except the items are explicitly positioned\n\
 in a virtual cell of the layout grid, and column or row spanning is allowed.  For example, this\n\
 static text is positioned at (0,0) and it spans 7 columns.");
index 38249693838bfec028394e1eab9311ec8425e391..10db9ced6d36decd09d194d2f3c72f458e27f57b 100644 (file)
@@ -40,7 +40,7 @@ class OwnerDrawnFrame : public wxFrame
 {
 public:
     // ctor & dtor
-    OwnerDrawnFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h);
+    OwnerDrawnFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h);
     ~OwnerDrawnFrame(){};
 
     // notifications
@@ -202,7 +202,7 @@ void OwnerDrawnFrame::InitMenu()
 }
 
 // main frame constructor
-OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, wxChar *title,
+OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, const wxChar *title,
                                  int x, int y, int w, int h)
          : wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h))
 {
index dc0e35c68b3b99b1ad972be77e0e4f057a9155b5..0035f4b1ad809b78bc53e5692d4c531d3609ff39 100644 (file)
@@ -66,7 +66,7 @@ wxPageSetupData* g_pageSetupData = (wxPageSetupData*) NULL;
 IMPLEMENT_APP(MyApp)
 
 // Writes a header on a page. Margin units are in millimetres.
-bool WritePageHeader(wxPrintout *printout, wxDC *dc, wxChar *text, float mmToLogical);
+bool WritePageHeader(wxPrintout *printout, wxDC *dc, const wxChar *text, float mmToLogical);
 
 // The `main program' equivalent, creating the windows and returning the
 // main frame
@@ -578,7 +578,7 @@ void MyPrintout::DrawPageTwo(wxDC *dc)
 }
 
 // Writes a header on a page. Margin units are in millimetres.
-bool WritePageHeader(wxPrintout *printout, wxDC *dc, wxChar *text, float mmToLogical)
+bool WritePageHeader(wxPrintout *printout, wxDC *dc, const wxChar *text, float mmToLogical)
 {
 /*
 static wxFont *headerFont = (wxFont *) NULL;
index 0b04dccc6b70dd9e49515adaa6a1804985a42f39..f3c2b6d98c3b99b2c7549993227bea8b21fb340e 100644 (file)
@@ -68,7 +68,7 @@ DECLARE_EVENT_TABLE()
 class MyPrintout: public wxPrintout
 {
  public:
-  MyPrintout(wxChar *title = _T("My printout")):wxPrintout(title) {}
+  MyPrintout(const wxChar *title = _T("My printout")):wxPrintout(title) {}
   bool OnPrintPage(int page);
   bool HasPage(int page);
   bool OnBeginDocument(int startPage, int endPage);
index d350aba026eedcc347f1c1b55b19a8bba3ca18b3..dd05152ec7e5922650949776bac67bb504d4d99a 100644 (file)
@@ -181,7 +181,7 @@ class RegFrame : public wxFrame
 {
 public:
     // ctor & dtor
-    RegFrame(wxFrame *parent, wxChar *title, int x, int y, int w, int h);
+    RegFrame(wxFrame *parent, const wxChar *title, int x, int y, int w, int h);
     virtual ~RegFrame();
 
     // callbacks
@@ -331,7 +331,7 @@ bool RegApp::OnInit()
 // RegFrame
 // ----------------------------------------------------------------------------
 
-RegFrame::RegFrame(wxFrame *parent, wxChar *title, int x, int y, int w, int h)
+RegFrame::RegFrame(wxFrame *parent, const wxChar *title, int x, int y, int w, int h)
         : wxFrame(parent, wxID_ANY, title, wxPoint(x, y), wxSize(w, h))
 {
     // this reduces flicker effects
index 4115c72fd3b15c19d04f40fac290564476050b0d..197d0eb548d171c2367cf07ad8850da2016f58b2 100644 (file)
@@ -120,7 +120,7 @@ struct wxCmdLineOption
     void SetStrVal(const wxString& val)
         { Check(wxCMD_LINE_VAL_STRING); m_strVal = val; m_hasVal = true; }
 #if wxUSE_DATETIME
-    void SetDateVal(const wxDateTime val)
+    void SetDateVal(const wxDateTime& val)
         { Check(wxCMD_LINE_VAL_DATE); m_dateVal = val; m_hasVal = true; }
 #endif // wxUSE_DATETIME
 
index 71c183c3a24770dd8f17ab642be92dca7856d61e..5a7ac476e0b12c903a001c9e126c43c99a7364ba 100644 (file)
@@ -83,7 +83,7 @@ void wxEffects::DrawSunkenEdge(wxDC& dc, const wxRect& rect, int WXUNUSED(border
     dc.SetPen(wxNullPen);
 }
 
-bool wxEffects::TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap)
+bool wxEffects::TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap)
 {
     static bool hiColour = (wxDisplayDepth() >= 16) ;
 
index 3ede1c004a2f4ee0f58ec7e42b356c2364936bfc..5549cd7bb3ef0bfe2b00df82d0a099933d0f653e 100644 (file)
@@ -572,7 +572,7 @@ wxFileConfig::~wxFileConfig()
 // parse a config file
 // ----------------------------------------------------------------------------
 
-void wxFileConfig::Parse(wxTextBuffer& buffer, bool bLocal)
+void wxFileConfig::Parse(const wxTextBuffer& buffer, bool bLocal)
 {
   const wxChar *pStart;
   const wxChar *pEnd;
index 01625ab42bdf155dfb40937ab9669009e4ef8aab..bddce519a278ceb9fbed95026a13fed3c666c752 100644 (file)
@@ -514,7 +514,7 @@ void wxNativeFontInfo::SetUnderlined(bool underlined_)
     underlined = underlined_;
 }
 
-void wxNativeFontInfo::SetFaceName(wxString facename_)
+void wxNativeFontInfo::SetFaceName(const wxString& facename_)
 {
     faceName = facename_;
 }
index 6fe6c097bf51d8ed3415929e9a56727a3b215749..5c983a1def81760c90e131154cf77af37562ced7 100644 (file)
@@ -41,7 +41,7 @@ class MemFSHashObj : public wxObject
             InitTime();
         }
 
-        MemFSHashObj(wxMemoryOutputStream& stream)
+        MemFSHashObj(const wxMemoryOutputStream& stream)
         {
             m_Len = stream.GetSize();
             m_Data = new char[m_Len];
index 5ed93b5824d6d43f94ac17526d2edc42437fe51a..c77c3152422c37b6233a21113e6d18f118435a86 100644 (file)
@@ -641,8 +641,8 @@ wxSocketBase *wxFTP::AcceptIfActive(wxSocketBase *sock)
     return sock;
 }
 
-wxString wxFTP::GetPortCmdArgument(wxIPV4address addrLocal,
-                                   wxIPV4address addrNew)
+wxString wxFTP::GetPortCmdArgument(const wxIPV4address& addrLocal,
+                                   const wxIPV4address& addrNew)
 {
     // Just fills in the return value with the local IP
     // address of the current socket.  Also it fill in the
index 1322e26285e3818c170b98d05e3bd49bcca69887..31f3cab4bd8ddbb445c7d3c7b64ea9ab7ad53577 100644 (file)
@@ -47,7 +47,7 @@ wxConnectionBase::wxConnectionBase()
 {
 }
 
-wxConnectionBase::wxConnectionBase(wxConnectionBase& copy)
+wxConnectionBase::wxConnectionBase(const wxConnectionBase& copy)
     : wxObject(),
       m_connected(copy.m_connected),
       m_buffer(copy.m_buffer),
index 89c88ec5baa6da626b1e0cd8bb90be2b89ec3acd..72a72517e42f09303a58879c94c36097a09985c3 100644 (file)
@@ -71,7 +71,7 @@ void wxTransformMatrix::operator = (const wxTransformMatrix& mat)
     m_isIdentity = mat.m_isIdentity;
 }
 
-bool wxTransformMatrix::operator == (const wxTransformMatrix& mat)
+bool wxTransformMatrix::operator == (const wxTransformMatrix& mat) const
 {
     if (m_isIdentity && mat.m_isIdentity)
         return true;
@@ -88,7 +88,7 @@ bool wxTransformMatrix::operator == (const wxTransformMatrix& mat)
     return true;
 }
 
-bool wxTransformMatrix::operator != (const wxTransformMatrix& mat)
+bool wxTransformMatrix::operator != (const wxTransformMatrix& mat) const
 {
     return (! ((*this) == mat));
 }
index 73ab3c04fa2f001f263ed046abf3b0b2c99b96af..d7c77768b74e4cd981a9f8dc73f178224c5a0d80 100644 (file)
@@ -214,7 +214,7 @@ wxString wxIPV4address::IPAddress() const
         );
 }
 
-bool wxIPV4address::operator==(wxIPV4address& addr)
+bool wxIPV4address::operator==(const wxIPV4address& addr) const
 {
     if(Hostname().Cmp(addr.Hostname().c_str()) == 0 && Service() == addr.Service()) return true;
     return false;
index 83aa3483aa21f742240539ffdc556a5d89482422..1029dc6ee2586dfd2d6e6e2b840f6e77fc0787cc 100644 (file)
@@ -295,8 +295,10 @@ wxSize wxSizerItem::GetMinSizeWithBorder() const
 }
 
 
-void wxSizerItem::SetDimension( wxPoint pos, wxSize size )
+void wxSizerItem::SetDimension( const wxPoint& pos_, const wxSize& size_ )
 {
+    wxPoint pos = pos_;
+    wxSize size = size_;
     if (m_flag & wxSHAPED)
     {
         // adjust aspect ratio
index 43704880e84e67b5b8aae80bf8a6d334c5c13ed5..9bf472c51764cba196b2dab29b101d8c86c0a2d4 100644 (file)
@@ -1053,7 +1053,7 @@ wxUint32 wxSocketBase::GetPushback(void *buffer, wxUint32 size, bool peek)
 // Ctor
 // --------------------------------------------------------------------------
 
-wxSocketServer::wxSocketServer(wxSockAddress& addr_man,
+wxSocketServer::wxSocketServer(const wxSockAddress& addr_man,
                                wxSocketFlags flags)
               : wxSocketBase(flags, wxSOCKET_SERVER)
 {
@@ -1260,7 +1260,7 @@ bool wxSocketClient::WaitOnConnect(long seconds, long milliseconds)
 
 /* NOTE: experimental stuff - might change */
 
-wxDatagramSocket::wxDatagramSocket( wxSockAddress& addr,
+wxDatagramSocket::wxDatagramSocket( const wxSockAddress& addr,
                                     wxSocketFlags flags )
                 : wxSocketBase( flags, wxSOCKET_DATAGRAM )
 {
@@ -1300,7 +1300,7 @@ wxDatagramSocket& wxDatagramSocket::RecvFrom( wxSockAddress& addr,
     return (*this);
 }
 
-wxDatagramSocket& wxDatagramSocket::SendTo( wxSockAddress& addr,
+wxDatagramSocket& wxDatagramSocket::SendTo( const wxSockAddress& addr,
                                             const void* buf,
                                             wxUint32 nBytes )
 {
index 197531b3d191ab63b5ec55417c49045246bb8446..c1b7d71ad8f51c5fab8c0e7dcc9854fcf9a2c326 100644 (file)
@@ -89,7 +89,7 @@ bool wxIsStockID(wxWindowID id)
     }
 }
 
-wxString wxGetStockLabel(wxWindowID id, bool withCodes, wxString accelerator)
+wxString wxGetStockLabel(wxWindowID id, bool withCodes, const wxString& accelerator)
 {
     wxString stockLabel;
 
index ea517a641d7d186900979b8a22d25afd58d6ba22..3c900fa4de126d14e5da935fc05747494e735d60 100644 (file)
@@ -1644,8 +1644,8 @@ void wxGridCellRenderer::Draw(wxGrid& grid,
 // wxGridCellStringRenderer
 // ----------------------------------------------------------------------------
 
-void wxGridCellStringRenderer::SetTextColoursAndFont(wxGrid& grid,
-                                                     wxGridCellAttr& attr,
+void wxGridCellStringRenderer::SetTextColoursAndFont(const wxGrid& grid,
+                                                     const wxGridCellAttr& attr,
                                                      wxDC& dc,
                                                      bool isSelected)
 {
@@ -1676,7 +1676,7 @@ void wxGridCellStringRenderer::SetTextColoursAndFont(wxGrid& grid,
     dc.SetFont( attr.GetFont() );
 }
 
-wxSize wxGridCellStringRenderer::DoGetBestSize(wxGridCellAttr& attr,
+wxSize wxGridCellStringRenderer::DoGetBestSize(const wxGridCellAttr& attr,
                                                wxDC& dc,
                                                const wxString& text)
 {
@@ -1797,7 +1797,7 @@ void wxGridCellStringRenderer::Draw(wxGrid& grid,
 // wxGridCellNumberRenderer
 // ----------------------------------------------------------------------------
 
-wxString wxGridCellNumberRenderer::GetString(wxGrid& grid, int row, int col)
+wxString wxGridCellNumberRenderer::GetString(const wxGrid& grid, int row, int col)
 {
     wxGridTableBase *table = grid.GetTable();
     wxString text;
@@ -1863,7 +1863,7 @@ wxGridCellRenderer *wxGridCellFloatRenderer::Clone() const
     return renderer;
 }
 
-wxString wxGridCellFloatRenderer::GetString(wxGrid& grid, int row, int col)
+wxString wxGridCellFloatRenderer::GetString(const wxGrid& grid, int row, int col)
 {
     wxGridTableBase *table = grid.GetTable();
 
@@ -7563,7 +7563,7 @@ void wxGrid::StringToLines( const wxString& value, wxArrayString& lines )
 }
 
 
-void wxGrid::GetTextBoxSize( wxDC& dc,
+void wxGrid::GetTextBoxSize( const wxDC& dc,
                              const wxArrayString& lines,
                              long *width, long *height )
 {
index 1c69499c2358498969271e7fb7380fa3b9190f86..2fcacdfd842387aa86d41a64a788beb265428ed6 100644 (file)
@@ -33,7 +33,7 @@
 
 // Enables a grid cell to display a formated date and or time
 
-wxGridCellDateTimeRenderer::wxGridCellDateTimeRenderer(wxString outformat, wxString informat)
+wxGridCellDateTimeRenderer::wxGridCellDateTimeRenderer(const wxString& outformat, const wxString& informat)
 {
     m_iformat = informat;
     m_oformat = outformat;
@@ -52,7 +52,7 @@ wxGridCellRenderer *wxGridCellDateTimeRenderer::Clone() const
     return renderer;
 }
 
-wxString wxGridCellDateTimeRenderer::GetString(wxGrid& grid, int row, int col)
+wxString wxGridCellDateTimeRenderer::GetString(const wxGrid& grid, int row, int col)
 {
     wxGridTableBase *table = grid.GetTable();
 
@@ -142,7 +142,7 @@ wxGridCellRenderer *wxGridCellEnumRenderer::Clone() const
     return renderer;
 }
 
-wxString wxGridCellEnumRenderer::GetString(wxGrid& grid, int row, int col)
+wxString wxGridCellEnumRenderer::GetString(const wxGrid& grid, int row, int col)
 {
     wxGridTableBase *table = grid.GetTable();
     wxString text;
@@ -326,7 +326,7 @@ wxGridCellAutoWrapStringRenderer::Draw(wxGrid& grid,
 wxArrayString
 wxGridCellAutoWrapStringRenderer::GetTextLines(wxGrid& grid,
                                                wxDC& dc,
-                                               wxGridCellAttr& attr,
+                                               const wxGridCellAttr& attr,
                                                const wxRect& rect,
                                                int row, int col)
 {
index 80d4442fb68746d3279e419ec5077049fe225775..f6669cbfe978bf69d1043689dab60812500d0acd 100644 (file)
@@ -151,7 +151,7 @@ private:
 class wxHtmlListBoxStyle : public wxDefaultHtmlRenderingStyle
 {
 public:
-    wxHtmlListBoxStyle(wxHtmlListBox& hlbox) : m_hlbox(hlbox) { }
+    wxHtmlListBoxStyle(const wxHtmlListBox& hlbox) : m_hlbox(hlbox) { }
 
     virtual wxColour GetSelectedTextColour(const wxColour& colFg)
     {
index 64429523814b30dc33f62a39105759c2d8793c12..cd1e3dd934acc86e44cde49aa0cc49ed9a538910 100644 (file)
@@ -362,7 +362,7 @@ public:
     void GetItem( int index, wxListItem &info );
 
     wxString GetText(int index) const;
-    void SetText( int index, const wxString s );
+    void SetText( int index, const wxString& s );
 
     wxListItemAttr *GetAttr() const;
     void SetAttr(wxListItemAttr *attr);
@@ -466,7 +466,7 @@ private:
 
     // generate and process the list event of the given type, return true if
     // it wasn't vetoed, i.e. if we should proceed
-    bool SendListEvent(wxEventType type, wxPoint pos);
+    bool SendListEvent(wxEventType type, const wxPoint& pos);
 
     DECLARE_DYNAMIC_CLASS(wxListHeaderWindow)
     DECLARE_EVENT_TABLE()
@@ -717,7 +717,7 @@ public:
     // send out a wxListEvent
     void SendNotify( size_t line,
                      wxEventType command,
-                     wxPoint point = wxDefaultPosition );
+                     const wxPoint& point = wxDefaultPosition );
 
     // override base class virtual to reset m_lineHeight when the font changes
     virtual bool SetFont(const wxFont& font)
@@ -1365,7 +1365,7 @@ wxString wxListLineData::GetText(int index) const
     return s;
 }
 
-void wxListLineData::SetText( int index, const wxString s )
+void wxListLineData::SetText( int index, const wxString& s )
 {
     wxListItemDataList::compatibility_iterator node = m_items.Item( index );
     if (node)
@@ -2009,7 +2009,7 @@ void wxListHeaderWindow::OnSetFocus( wxFocusEvent &WXUNUSED(event) )
     m_owner->Update();
 }
 
-bool wxListHeaderWindow::SendListEvent(wxEventType type, wxPoint pos)
+bool wxListHeaderWindow::SendListEvent(wxEventType type, const wxPoint& pos)
 {
     wxWindow *parent = GetParent();
     wxListEvent le( type, parent->GetId() );
@@ -2794,7 +2794,7 @@ void wxListMainWindow::HighlightAll( bool on )
 
 void wxListMainWindow::SendNotify( size_t line,
                                    wxEventType command,
-                                   wxPoint point )
+                                   const wxPoint& point )
 {
     wxListEvent le( command, GetParent()->GetId() );
     le.SetEventObject( GetParent() );
index c0bd2db2259ee182c00c2785811ab7f310ff7622..bc604731437693b6a4cfdbc8653458883f4e1fc3 100644 (file)
@@ -83,12 +83,12 @@ wxPalette& wxPalette::operator = (const wxPalette& palette)
     return *this;
 }
 
-bool wxPalette::operator == (const wxPalette& palette)
+bool wxPalette::operator == (const wxPalette& palette) const
 {
     return m_refData == palette.m_refData;
 }
 
-bool wxPalette::operator != (const wxPalette& palette)
+bool wxPalette::operator != (const wxPalette& palette) const
 {
     return m_refData != palette.m_refData;
 }
index 218f5a324c3e5042ac1497d7bc93af18ea232906..92cbe6ad958170069ffe3ecfdd04cd71e36b3a69 100644 (file)
@@ -275,7 +275,7 @@ wxObjectRefData *wxRegionGeneric::CloneRefData(const wxObjectRefData *data) cons
     return new wxRegionRefData(*(wxRegionRefData *)data);
 }
 
-bool wxRegionGeneric::operator== (const wxRegionGeneric& region)
+bool wxRegionGeneric::operator== (const wxRegionGeneric& region) const
 {
     wxASSERT(m_refData && region.m_refData);
     return REGION::XEqualRegion(M_REGIONDATA,M_REGIONDATA_OF(region));
index 41fa24dec59f10974e23e2415857dd132ae94cf5..9b6ea31e908225d0919d9d052d2b756766672e5d 100644 (file)
@@ -173,7 +173,7 @@ void wxTextEntryDialog::SetTextValidator( long style )
     m_textctrl->SetValidator( validator );
 }
 
-void wxTextEntryDialog::SetTextValidator( wxTextValidator& validator )
+void wxTextEntryDialog::SetTextValidator( const wxTextValidator& validator )
 {
     m_textctrl->SetValidator( validator );
 }
index 0be1f0672431f1a9bd954b7c0a00c8b95f728b78..ca8605052733f7564b111cdd6932d30a410bb85f 100644 (file)
@@ -157,7 +157,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
         if (parent)
             gtk_parent = GTK_WINDOW( gtk_widget_get_toplevel(parent->m_widget) );
 
-        gchar* ok_btn_stock;
+        const gchar* ok_btn_stock;
         if ( style & wxSAVE )
         {
             gtk_action = GTK_FILE_CHOOSER_ACTION_SAVE;
index 648fa71e1723a5d2177f02807a7bdacd9bbf1c01..93aef5fc1673bed75020b41c98364f8c3f9a0e42 100644 (file)
@@ -160,7 +160,7 @@ wxObjectRefData *wxRegion::CloneRefData(const wxObjectRefData *data) const
 // wxRegion comparison
 // ----------------------------------------------------------------------------
 
-bool wxRegion::operator==( const wxRegion& region )
+bool wxRegion::operator==( const wxRegion& region ) const
 {
     if (m_refData == region.m_refData) return TRUE;
 
index f6aa7b6cb4ba9cd0b282848f9aa8b6ba85f49570..ea62e181859e8f271ae68f646a015a1de94b5927 100644 (file)
@@ -164,7 +164,7 @@ extern "C" {
 static void wxGtkTextInsert(GtkWidget *text,
                             GtkTextBuffer *text_buffer,
                             const wxTextAttr& attr,
-                            wxCharBuffer buffer)
+                            const wxCharBuffer& buffer)
 
 {
     gint start_offset;
index 0be1f0672431f1a9bd954b7c0a00c8b95f728b78..ca8605052733f7564b111cdd6932d30a410bb85f 100644 (file)
@@ -157,7 +157,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
         if (parent)
             gtk_parent = GTK_WINDOW( gtk_widget_get_toplevel(parent->m_widget) );
 
-        gchar* ok_btn_stock;
+        const gchar* ok_btn_stock;
         if ( style & wxSAVE )
         {
             gtk_action = GTK_FILE_CHOOSER_ACTION_SAVE;
index 648fa71e1723a5d2177f02807a7bdacd9bbf1c01..93aef5fc1673bed75020b41c98364f8c3f9a0e42 100644 (file)
@@ -160,7 +160,7 @@ wxObjectRefData *wxRegion::CloneRefData(const wxObjectRefData *data) const
 // wxRegion comparison
 // ----------------------------------------------------------------------------
 
-bool wxRegion::operator==( const wxRegion& region )
+bool wxRegion::operator==( const wxRegion& region ) const
 {
     if (m_refData == region.m_refData) return TRUE;
 
index f6aa7b6cb4ba9cd0b282848f9aa8b6ba85f49570..ea62e181859e8f271ae68f646a015a1de94b5927 100644 (file)
@@ -164,7 +164,7 @@ extern "C" {
 static void wxGtkTextInsert(GtkWidget *text,
                             GtkTextBuffer *text_buffer,
                             const wxTextAttr& attr,
-                            wxCharBuffer buffer)
+                            const wxCharBuffer& buffer)
 
 {
     gint start_offset;
index 169626f16afe638d638ca796cce7e0bbe8a23726..3f403439b69737015adc5bf1e350b29813b3b7a0 100644 (file)
@@ -1187,7 +1187,7 @@ void wxHtmlHelpFrame::WriteCustomization(wxConfigBase *cfg, const wxString& path
 
 
 
-static void SetFontsToHtmlWin(wxHtmlWindow *win, wxString scalf, wxString fixf, int size)
+static void SetFontsToHtmlWin(wxHtmlWindow *win, const wxString& scalf, const wxString& fixf, int size)
 {
     int f_sizes[7];
     f_sizes[0] = int(size * 0.6);
index 73f5a738027a61dbecba6bbc8a6467677f589a6b..b2db6ded5417907f78408fd291a208da62909254 100644 (file)
@@ -252,7 +252,7 @@ bool wxHtmlCell::IsBefore(wxHtmlCell *cell) const
 
 IMPLEMENT_ABSTRACT_CLASS(wxHtmlWordCell, wxHtmlCell)
 
-wxHtmlWordCell::wxHtmlWordCell(const wxString& word, wxDC& dc) : wxHtmlCell()
+wxHtmlWordCell::wxHtmlWordCell(const wxString& word, const wxDC& dc) : wxHtmlCell()
 {
     m_Word = word;
     dc.GetTextExtent(m_Word, &m_Width, &m_Height, &m_Descent);
@@ -272,7 +272,7 @@ void wxHtmlWordCell::SetPreviousWord(wxHtmlWordCell *cell)
 // Splits m_Word into up to three parts according to selection, returns
 // substring before, in and after selection and the points (in relative coords)
 // where s2 and s3 start:
-void wxHtmlWordCell::Split(wxDC& dc,
+void wxHtmlWordCell::Split(const wxDC& dc,
                            const wxPoint& selFrom, const wxPoint& selTo,
                            unsigned& pos1, unsigned& pos2) const
 {
@@ -337,7 +337,7 @@ void wxHtmlWordCell::Split(wxDC& dc,
     pos2 = j;
 }
 
-void wxHtmlWordCell::SetSelectionPrivPos(wxDC& dc, wxHtmlSelection *s) const
+void wxHtmlWordCell::SetSelectionPrivPos(const wxDC& dc, wxHtmlSelection *s) const
 {
     unsigned p1, p2;
 
index ad552c59bd147f6411b41453fb3c4aa84b3fab8e..f11ebb2af639545c73ba04200630125e5e37fba4 100644 (file)
@@ -351,7 +351,7 @@ void wxHtmlParser::AddTagHandler(wxHtmlTagHandler *handler)
     handler->SetParser(this);
 }
 
-void wxHtmlParser::PushTagHandler(wxHtmlTagHandler *handler, wxString tags)
+void wxHtmlParser::PushTagHandler(wxHtmlTagHandler *handler, const wxString& tags)
 {
     wxStringTokenizer tokenizer(tags, wxT(", "));
     wxString key;
index 31b9f952ca06847b896c361dc51c8ec6ba58f810..a1f8c33629daf9988083309acd2d0c81af8759e1 100644 (file)
@@ -235,7 +235,7 @@ void wxHtmlWindow::SetRelatedStatusBar(int bar)
 
 
 
-void wxHtmlWindow::SetFonts(wxString normal_face, wxString fixed_face, const int *sizes)
+void wxHtmlWindow::SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes)
 {
     wxString op = m_OpenedPage;
 
index 0474ae226cbad4d3476cc58c2bec2b6f3889e07a..b6a1bc636dc3123e08a8ce6ea9976c7736961e18 100644 (file)
@@ -89,7 +89,7 @@ void wxHtmlDCRenderer::SetHtmlText(const wxString& html, const wxString& basepat
 }
 
 
-void wxHtmlDCRenderer::SetFonts(wxString normal_face, wxString fixed_face,
+void wxHtmlDCRenderer::SetFonts(const wxString& normal_face, const wxString& fixed_face,
                                 const int *sizes)
 {
     m_Parser->SetFonts(normal_face, fixed_face, sizes);
@@ -452,7 +452,7 @@ void wxHtmlPrintout::SetMargins(float top, float bottom, float left, float right
 
 
 
-void wxHtmlPrintout::SetFonts(wxString normal_face, wxString fixed_face,
+void wxHtmlPrintout::SetFonts(const wxString& normal_face, const wxString& fixed_face,
                               const int *sizes)
 {
     m_Renderer->SetFonts(normal_face, fixed_face, sizes);
@@ -628,7 +628,7 @@ void wxHtmlEasyPrinting::SetFooter(const wxString& footer, int pg)
 }
 
 
-void wxHtmlEasyPrinting::SetFonts(wxString normal_face, wxString fixed_face,
+void wxHtmlEasyPrinting::SetFonts(const wxString& normal_face, const wxString& fixed_face,
                                   const int *sizes)
 {
     m_fontMode = FontMode_Explicit;
index e924f2ef1a54005e0a0338a94c628ffc321a7e3b..7fc11a1280288ba1988c6baabe45abb2f7aed3d5 100644 (file)
@@ -111,7 +111,7 @@ void wxHtmlWinParser::RemoveModule(wxHtmlTagsModule *module)
     m_Modules.DeleteObject(module);
 }
 
-void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face,
+void wxHtmlWinParser::SetFonts(const wxString& normal_face, const wxString& fixed_face,
                                const int *sizes)
 {
     static int default_sizes[7] =
index b32cc0993e7a36aa7f4b55df49bb89d035a83485..382bd5d35f64c21fa8ce213476c6f3802d2965fe 100644 (file)
@@ -60,7 +60,7 @@ wxFontDialog::~wxFontDialog()
     // empty
 }
 
-void wxFontDialog::SetData(wxFontData& fontdata)
+void wxFontDialog::SetData(const wxFontData& fontdata)
 {
     m_fontData = fontdata;
 }
index 73fef68d655122206a30e9886d523f54b36a60a7..cc471b746b2db7d9e3ee2f5f294449b232b5fa4d 100644 (file)
@@ -968,7 +968,7 @@ public:
         }
     }
 
-    static void PrintOutType(wxString& sMessage, wxString sValue, CFTypeRef cfRef)
+    static void PrintOutType(wxString& sMessage, const wxString& sValue, CFTypeRef cfRef)
     {
             sMessage << wxT(" {");
 
index 59de4dc29d29b262acfe73c53b6c4b5e9c3d3a64..e8d8fa060ff38efac77722f8d4f4bd5ccb9fc694 100644 (file)
@@ -2555,7 +2555,7 @@ static pascal void wxMacControlUserPaneDrawProc(ControlRef control, SInt16 part)
         win->MacControlUserPaneDrawProc(part) ;
 }
 
-static pascal ControlPartCode wxMacControlUserPaneHitTestProc(ControlRef control, Point where)
+static pascal ControlPartCode wxMacControlUserPaneHitTestProc(ControlRef control, const Point& where)
 {
     wxTextCtrl *textCtrl =  wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
     wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
@@ -2565,7 +2565,7 @@ static pascal ControlPartCode wxMacControlUserPaneHitTestProc(ControlRef control
         return kControlNoPart ;
 }
 
-static pascal ControlPartCode wxMacControlUserPaneTrackingProc(ControlRef control, Point startPt, ControlActionUPP actionProc)
+static pascal ControlPartCode wxMacControlUserPaneTrackingProc(ControlRef control, const Point& startPt, ControlActionUPP actionProc)
 {
     wxTextCtrl *textCtrl =  wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
     wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
index 7751eee526ce3349d396dc2bb413fc8ed012c148..8a3f2979e61c115b604c2487833d32a517bee1a4 100644 (file)
@@ -31,7 +31,7 @@ class wxMacToolTip
         wxMacToolTip( ) ;
         ~wxMacToolTip() ;
         
-        void            Setup( WindowRef window  , const wxString& text , wxPoint localPosition ) ;
+        void            Setup( WindowRef window  , const wxString& text , const wxPoint& localPosition ) ;
         long            GetMark() { return m_mark ; }
         void             Draw() ;
         void            Clear() ;
@@ -184,7 +184,7 @@ wxMacToolTip::wxMacToolTip()
     m_timer = NULL ;
 }
 
-void wxMacToolTip::Setup( WindowRef win  , const wxString& text , wxPoint localPosition ) 
+void wxMacToolTip::Setup( WindowRef win  , const wxString& text , const wxPoint& localPosition ) 
 {
     m_mark++ ;
     Clear() ;
index 8d4256df6783f986ad96012ed2c76668bc72184a..32a04d0415b0026ce597059e7f22c1c5a66fc395 100644 (file)
@@ -394,7 +394,7 @@ static void SetupMouseEvent( wxMouseEvent &wxevent , wxMacCarbonEvent &cEvent )
     }
 }
 
-ControlRef wxMacFindSubControl( wxTopLevelWindowMac* toplevelWindow, Point location , ControlRef superControl , ControlPartCode *outPart )
+ControlRef wxMacFindSubControl( wxTopLevelWindowMac* toplevelWindow, const Point& location , ControlRef superControl , ControlPartCode *outPart )
 {
     if ( superControl )
     {
@@ -441,7 +441,7 @@ ControlRef wxMacFindSubControl( wxTopLevelWindowMac* toplevelWindow, Point locat
     return NULL ;
 }
 
-ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow , Point location , WindowRef window , ControlPartCode *outPart )
+ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow , const Point& location , WindowRef window , ControlPartCode *outPart )
 {
 #if TARGET_API_MAC_OSX
     if ( UMAGetSystemVersion() >= 0x1030 && ( toplevelWindow == 0 || toplevelWindow->MacUsesCompositing() ) )
index 4e60d2d0c53c2c2a8f472d138a186ac718c09955..ea980004f207c13513b884dfa7bc86c66336144a 100644 (file)
@@ -67,7 +67,7 @@ bool wxClipboardOpen()
     return wxTheClipboard->IsOpened();
 }
 
-bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat)
+bool wxIsClipboardFormatAvailable(const wxDataFormat& dataFormat)
 {
     return wxTheClipboard->IsSupported( dataFormat );
 }
@@ -129,7 +129,7 @@ wxObject *wxGetClipboardData(wxDataFormat dataFormat, long *len)
     return NULL; // just in case...
 }
 
-wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat)
+wxDataFormat wxEnumClipboardFormats(const wxDataFormat& dataFormat)
 {
     // Only wxDF_TEXT supported
     if (dataFormat == wxDF_TEXT)
@@ -144,7 +144,7 @@ wxDataFormat wxRegisterClipboardFormat(char *WXUNUSED(formatName))
     return wxDF_INVALID;
 }
 
-bool wxGetClipboardFormatName(wxDataFormat dataFormat, char *formatName,
+bool wxGetClipboardFormatName(const wxDataFormat& dataFormat, char *formatName,
                               int maxCount)
 {
     wxStrncpy( formatName, dataFormat.GetId().c_str(), maxCount );
index 439189b6a7bf01d23be5c7ca8807ef793af695be..f01ea0a2a4234bc8203e75cba96131c4f9cf6d41 100644 (file)
@@ -240,7 +240,7 @@ bool wxArrowButton::Create( wxSpinButton* parent, wxWindowID id,
 IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl);
 IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent);
 
-static void CalcSizes( wxPoint pt, wxSize sz,
+static void CalcSizes( const wxPoint& pt, const wxSize& sz,
                        wxPoint& pt1, wxSize& sz1,
                        wxPoint& pt2, wxSize& sz2,
                        bool isVertical )
index 8766c9b4013c0eeacd841d058604bd6240fd0a39..fee2d0fb038b1e11366e987f3a355d28397bd068 100644 (file)
@@ -926,7 +926,7 @@ void wxDoChangeBackgroundColour(WXWidget widget, wxColour& backgroundColour, boo
         NULL);
 }
 
-extern void wxDoChangeFont(WXWidget widget, wxFont& font)
+extern void wxDoChangeFont(WXWidget widget, const wxFont& font)
 {
     // Lesstif 0.87 hangs here, but 0.93 does not; MBN: sometimes it does
 #if !wxCHECK_LESSTIF() // || wxCHECK_LESSTIF_VERSION( 0, 93 )
@@ -967,7 +967,7 @@ XmString wxStringToXmString( const char* str )
 
 // Creates a bitmap with transparent areas drawn in
 // the given colour.
-wxBitmap wxCreateMaskedBitmap(const wxBitmap& bitmap, wxColour& colour)
+wxBitmap wxCreateMaskedBitmap(const wxBitmap& bitmap, const wxColour& colour)
 {
     wxBitmap newBitmap(bitmap.GetWidth(),
                        bitmap.GetHeight(),
index db0b0db413a56e3ed386503412038805f0af5a76..837bedda4544adc058c3402a01f90efa9e8e2176 100644 (file)
@@ -2519,7 +2519,7 @@ wxWindow *wxWindowBase::GetCapture()
 
 // Find the wxWindow at the current mouse position, returning the mouse
 // position.
-wxWindow* wxFindWindowAtPointer(wxPoint& pt)
+wxWindow* wxFindWindowAtPointer(const wxPoint& pt)
 {
     return wxFindWindowAtPoint(wxGetMousePosition());
 }
index 9b6c4cf1ff832942743b7d10f9e15923b3387387..d335ae6fce6bd48a49302192a12059344ca32b55 100644 (file)
@@ -562,7 +562,7 @@ void wxNativeFontInfo::SetUnderlined(bool underlined)
     lf.lfUnderline = underlined;
 }
 
-void wxNativeFontInfo::SetFaceName(wxString facename)
+void wxNativeFontInfo::SetFaceName(const wxString& facename)
 {
     wxStrncpy(lf.lfFaceName, facename, WXSIZEOF(lf.lfFaceName));
 }
index ac1ebae472810e50eabc52b7dbf980694d8a32d8..6577b0771c9a931b6df934158a246cd1c4d139d6 100644 (file)
@@ -119,7 +119,7 @@ public:
     }
 
     // init with conversion
-    void Init(LV_ITEM_OTHER& item)
+    void Init(const LV_ITEM_OTHER& item)
     {
         // avoid unnecessary dynamic memory allocation, jjust make m_pItem
         // point to our own m_item
@@ -659,7 +659,7 @@ bool wxListCtrl::GetColumn(int col, wxListItem& item) const
 }
 
 // Sets information about this column
-bool wxListCtrl::SetColumn(int col, wxListItem& item)
+bool wxListCtrl::SetColumn(int col, const wxListItem& item)
 {
     LV_COLUMN lvCol;
     wxConvertToMSWListCol(col, item, lvCol);
@@ -1486,7 +1486,7 @@ long wxListCtrl::HitTest(const wxPoint& point, int& flags)
 
 // Inserts an item, returning the index of the new item if successful,
 // -1 otherwise.
-long wxListCtrl::InsertItem(wxListItem& info)
+long wxListCtrl::InsertItem(const wxListItem& info)
 {
     wxASSERT_MSG( !IsVirtual(), _T("can't be used with virtual controls") );
 
@@ -1559,7 +1559,7 @@ long wxListCtrl::InsertItem(long index, const wxString& label, int imageIndex)
 }
 
 // For list view mode (only), inserts a column.
-long wxListCtrl::InsertColumn(long col, wxListItem& item)
+long wxListCtrl::InsertColumn(long col, const wxListItem& item)
 {
     LV_COLUMN lvCol;
     wxConvertToMSWListCol(col, item, lvCol);
index 6098efa556e36537df94b2816ef23ad4f8dff112..67049267bc380b4831b1d3b923e166862cac0f83 100644 (file)
@@ -1189,7 +1189,7 @@ public:
     wxDL_VOIDMETHOD_DEFINE(DestroyPortAssociation, (CGrafPtr g), (g));
     wxDL_VOIDMETHOD_DEFINE(NativeEventToMacEvent, (MSG* p1, EventRecord* p2), (p1,p2));
     wxDL_VOIDMETHOD_DEFINE(MCIsPlayerEvent, (ComponentInstance ci, EventRecord* p2), (ci, p2));
-    wxDL_METHOD_DEFINE(int, MCSetMovie, (ComponentInstance ci, Movie m, void* p1, Point w),
+    wxDL_METHOD_DEFINE(int, MCSetMovie, (ComponentInstance ci, Movie m, void* p1, const Point& w),
                           (ci,m,p1,w),0);
     wxDL_VOIDMETHOD_DEFINE(MCPositionController,
         (ComponentInstance ci, Rect* r, void* junk, void* morejunk), (ci,r,junk,morejunk));
index f4077c70f81b6a4e9b3cb56aebac038c07f03257..ff695a16d02bb1d4c6d78afad5d4c705e54cfd61 100644 (file)
@@ -691,7 +691,7 @@ void wxNativeFontInfo::SetUnderlined(
 } // end of wxNativeFontInfo::SetUnderlined
 
 void wxNativeFontInfo::SetFaceName(
-  wxString                          sFacename
+  const wxString&                   sFacename
 )
 {
     wxStrncpy((wxChar*)fa.szFacename, sFacename, WXSIZEOF(fa.szFacename));
index 022d8e1d4e4073621cda5b3a712ba693cd13c5f9..cf77187acba91b7e494dbb1bcb7dd060b7e22727 100644 (file)
@@ -254,7 +254,7 @@ void wxNativeFontInfo::SetUnderlined(bool WXUNUSED(underlined))
     wxFAIL_MSG( _T("not implemented") );
 }
 
-void wxNativeFontInfo::SetFaceName(wxString facename)
+void wxNativeFontInfo::SetFaceName(const wxString& facename)
 {
     pango_font_description_set_family( description, wxGTK_CONV(facename) );
 }
@@ -753,7 +753,7 @@ void wxNativeFontInfo::SetUnderlined(bool WXUNUSED(underlined))
     // can't do this under X
 }
 
-void wxNativeFontInfo::SetFaceName(wxString facename)
+void wxNativeFontInfo::SetFaceName(const wxString& facename)
 {
     SetXFontComponent(wxXLFD_FAMILY, facename);
 }
index 6e8dd85a1edb93f5330575b92e534f06cd5d1c2c..babe1dcca1c84b943960dc5a8779299af8549067 100644 (file)
@@ -123,7 +123,7 @@ wxObjectRefData *wxRegion::CloneRefData(const wxObjectRefData *data) const
 // wxRegion comparison
 // ----------------------------------------------------------------------------
 
-bool wxRegion::operator==( const wxRegion& region )
+bool wxRegion::operator==( const wxRegion& region ) const
 {
     if (m_refData == region.m_refData) return TRUE;