diff --git a/include/wx/calctrl.h b/include/wx/calctrl.h index 494b0975a1..de8881187e 100644 --- a/include/wx/calctrl.h +++ b/include/wx/calctrl.h @@ -164,7 +164,7 @@ public: wxCalendarEvent(const wxCalendarEvent& event) : wxDateEvent(event), m_wday(event.m_wday) { } - void SetWeekDay(const wxDateTime::WeekDay wd) { m_wday = wd; } + void SetWeekDay(wxDateTime::WeekDay wd) { m_wday = wd; } wxDateTime::WeekDay GetWeekDay() const { return m_wday; } virtual wxEvent *Clone() const wxOVERRIDE { return new wxCalendarEvent(*this); } diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index bef06b11ff..35f680adea 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -925,7 +925,7 @@ class WXDLLIMPEXP_CORE wxResourceCache: public wxList public: wxResourceCache() { } #if !wxUSE_STD_CONTAINERS - wxResourceCache(const unsigned int keyType) : wxList(keyType) { } + wxResourceCache(unsigned int keyType) : wxList(keyType) { } #endif virtual ~wxResourceCache(); }; diff --git a/include/wx/generic/dirctrlg.h b/include/wx/generic/dirctrlg.h index 6c7b4f0b26..9eb1554035 100644 --- a/include/wx/generic/dirctrlg.h +++ b/include/wx/generic/dirctrlg.h @@ -80,7 +80,7 @@ class WXDLLIMPEXP_CORE wxGenericDirCtrl: public wxControl { public: wxGenericDirCtrl(); - wxGenericDirCtrl(wxWindow *parent, const wxWindowID id = wxID_ANY, + wxGenericDirCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString &dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -93,7 +93,7 @@ public: Create(parent, id, dir, pos, size, style, filter, defaultFilter, name); } - bool Create(wxWindow *parent, const wxWindowID id = wxID_ANY, + bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString &dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -228,7 +228,7 @@ class WXDLLIMPEXP_CORE wxDirFilterListCtrl: public wxChoice { public: wxDirFilterListCtrl() { Init(); } - wxDirFilterListCtrl(wxGenericDirCtrl* parent, const wxWindowID id = wxID_ANY, + wxDirFilterListCtrl(wxGenericDirCtrl* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0) @@ -237,7 +237,7 @@ public: Create(parent, id, pos, size, style); } - bool Create(wxGenericDirCtrl* parent, const wxWindowID id = wxID_ANY, + bool Create(wxGenericDirCtrl* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index e466aba0a4..32a634158a 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -2117,21 +2117,21 @@ protected: // generate the appropriate grid event and return -1 if it was vetoed, 1 if // it was processed (but not vetoed) and 0 if it wasn't processed - int SendEvent(const wxEventType evtType, + int SendEvent(wxEventType evtType, int row, int col, const wxMouseEvent& e); - int SendEvent(const wxEventType evtType, + int SendEvent(wxEventType evtType, const wxGridCellCoords& coords, const wxMouseEvent& e) { return SendEvent(evtType, coords.GetRow(), coords.GetCol(), e); } - int SendEvent(const wxEventType evtType, + int SendEvent(wxEventType evtType, int row, int col, const wxString& s = wxString()); - int SendEvent(const wxEventType evtType, + int SendEvent(wxEventType evtType, const wxGridCellCoords& coords, const wxString& s = wxString()) { return SendEvent(evtType, coords.GetRow(), coords.GetCol(), s); } - int SendEvent(const wxEventType evtType, const wxString& s = wxString()) + int SendEvent(wxEventType evtType, const wxString& s = wxString()) { return SendEvent(evtType, m_currentCellCoords, s); } // send wxEVT_GRID_{ROW,COL}_SIZE or wxEVT_GRID_COL_AUTO_SIZE, return true diff --git a/include/wx/generic/srchctlg.h b/include/wx/generic/srchctlg.h index f6d085a79d..3eb8d21c92 100644 --- a/include/wx/generic/srchctlg.h +++ b/include/wx/generic/srchctlg.h @@ -180,7 +180,7 @@ public: wxTextCtrl& operator<<(long i); wxTextCtrl& operator<<(float f); wxTextCtrl& operator<<(double d); - wxTextCtrl& operator<<(const wxChar c); + wxTextCtrl& operator<<(wxChar c); #endif // do the window-specific processing after processing the update event diff --git a/include/wx/gtk/menu.h b/include/wx/gtk/menu.h index baec0a0e7f..49126e5583 100644 --- a/include/wx/gtk/menu.h +++ b/include/wx/gtk/menu.h @@ -75,7 +75,7 @@ public: void Attach(wxMenuBarBase *menubar) wxOVERRIDE; - void SetLayoutDirection(const wxLayoutDirection dir); + void SetLayoutDirection(wxLayoutDirection dir); wxLayoutDirection GetLayoutDirection() const; // Returns the title, with mnemonics translated to wx format diff --git a/include/wx/html/helpwnd.h b/include/wx/html/helpwnd.h index 3626a9a3d8..54639ad877 100644 --- a/include/wx/html/helpwnd.h +++ b/include/wx/html/helpwnd.h @@ -108,7 +108,7 @@ public: // Alternative version that works with numeric ID. // (uses extension to MS format, , see docs) - bool Display(const int id); + bool Display(int id); // Displays help window and focuses contents. bool DisplayContents(); diff --git a/include/wx/html/webkit.h b/include/wx/html/webkit.h index cfc210470e..0898182601 100644 --- a/include/wx/html/webkit.h +++ b/include/wx/html/webkit.h @@ -165,7 +165,7 @@ class WXDLLIMPEXP_CORE wxWebKitStateChangedEvent : public wxCommandEvent public: int GetState() { return m_state; } - void SetState(const int state) { m_state = state; } + void SetState(int state) { m_state = state; } wxString GetURL() { return m_url; } void SetURL(const wxString& url) { m_url = url; } diff --git a/include/wx/memory.h b/include/wx/memory.h index 401835378c..d6cc18301e 100644 --- a/include/wx/memory.h +++ b/include/wx/memory.h @@ -215,7 +215,7 @@ protected: // Returns the amount of padding needed after something of the given // size. This is so that when we cast pointers backwards and forwards // the pointer value will be valid for a wxMarkerType. - static size_t GetPadding (const size_t size) ; + static size_t GetPadding (size_t size) ; // Traverse the list. static void TraverseList (PmSFV, wxMemStruct *from = NULL); @@ -244,17 +244,17 @@ public: // Calculated from the request size and any padding needed // before the final marker. - static size_t PaddedSize (const size_t reqSize); + static size_t PaddedSize (size_t reqSize); // Calc the total amount of space we need from the system // to satisfy a caller request. This includes all padding. - static size_t TotSize (const size_t reqSize); + static size_t TotSize (size_t reqSize); // Return valid pointers to offsets within the allocated memory. static char * StructPos (const char * buf); static char * MidMarkerPos (const char * buf); static char * CallerMemPos (const char * buf); - static char * EndMarkerPos (const char * buf, const size_t size); + static char * EndMarkerPos (const char * buf, size_t size); // Given a pointer to the start of the caller requested area // return a pointer to the start of the entire alloc\'d buffer. diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h index b952b40d58..8c6553e5ac 100644 --- a/include/wx/osx/cocoa/private.h +++ b/include/wx/osx/cocoa/private.h @@ -35,7 +35,7 @@ OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage( WX_NSImage WXDLLIMPEXP_CORE wxOSXGetNSImageFromCGImage( CGImageRef image, double scale = 1.0, bool isTemplate = false); WX_NSImage WXDLLIMPEXP_CORE wxOSXGetNSImageFromIconRef( WXHICON iconref ); CGImageRef WXDLLIMPEXP_CORE wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage, double *scale = NULL ); -CGImageRef WXDLLIMPEXP_CORE wxOSXGetCGImageFromNSImage( const WX_NSImage nsimage, CGRect* r, CGContextRef cg); +CGImageRef WXDLLIMPEXP_CORE wxOSXGetCGImageFromNSImage( WX_NSImage nsimage, CGRect* r, CGContextRef cg); CGContextRef WXDLLIMPEXP_CORE wxOSXCreateBitmapContextFromNSImage( WX_NSImage nsimage, bool *isTemplate = NULL); wxBitmap WXDLLIMPEXP_CORE wxOSXCreateSystemBitmap(const wxString& id, const wxString &client, const wxSize& size); diff --git a/include/wx/qt/private/converter.h b/include/wx/qt/private/converter.h index 208ac86fce..f6406a8009 100644 --- a/include/wx/qt/private/converter.h +++ b/include/wx/qt/private/converter.h @@ -52,7 +52,7 @@ QSize wxQtConvertSize( const wxSize &size ); Qt::Orientation wxQtConvertOrientation( long style, wxOrientation defaultOrientation ); wxOrientation wxQtConvertOrientation( Qt::Orientation ); -wxKeyCode wxQtConvertKeyCode( int key, const Qt::KeyboardModifiers modifiers ); +wxKeyCode wxQtConvertKeyCode( int key, Qt::KeyboardModifiers modifiers ); void wxQtFillKeyboardModifiers( Qt::KeyboardModifiers modifiers, wxKeyboardState *state ); int wxQtConvertKeyCode( int keyCode, int modifiers, Qt::KeyboardModifiers &qtmodifiers ); diff --git a/include/wx/ustring.h b/include/wx/ustring.h index 1c533264e3..25934f6dc4 100644 --- a/include/wx/ustring.h +++ b/include/wx/ustring.h @@ -549,13 +549,13 @@ public: { return assign( s ); } wxUString& operator=(const wxScopedU32CharBuffer &s) { return assign( s ); } - wxUString& operator=(const char ch) + wxUString& operator=(char ch) { return assign( ch ); } - wxUString& operator=(const wxChar16 ch) + wxUString& operator=(wxChar16 ch) { return assign( ch ); } - wxUString& operator=(const wxChar32 ch) + wxUString& operator=(wxChar32 ch) { return assign( ch ); } - wxUString& operator=(const wxUniChar ch) + wxUString& operator=(wxUniChar ch) { return assign( ch ); } wxUString& operator=(const wxUniCharRef ch) { return assign( ch ); } @@ -579,13 +579,13 @@ public: { return append( s ); } wxUString& operator+=(const wxScopedU32CharBuffer &s) { return append( s ); } - wxUString& operator+=(const char ch) + wxUString& operator+=(char ch) { return append( ch ); } - wxUString& operator+=(const wxChar16 ch) + wxUString& operator+=(wxChar16 ch) { return append( ch ); } - wxUString& operator+=(const wxChar32 ch) + wxUString& operator+=(wxChar32 ch) { return append( ch ); } - wxUString& operator+=(const wxUniChar ch) + wxUString& operator+=(wxUniChar ch) { return append( ch ); } wxUString& operator+=(const wxUniCharRef ch) { return append( ch ); } diff --git a/include/wx/wxcrt.h b/include/wx/wxcrt.h index d6826da025..dbf556310c 100644 --- a/include/wx/wxcrt.h +++ b/include/wx/wxcrt.h @@ -95,7 +95,7 @@ WXDLLIMPEXP_BASE size_t wxWC2MB(char *buf, const wchar_t *psz, size_t n); return (wxChar*) memmove(szOut, szIn, len * sizeof(wxChar)); } - inline wxChar* wxTmemset(wxChar* szOut, const wxChar cIn, size_t len) + inline wxChar* wxTmemset(wxChar* szOut, wxChar cIn, size_t len) { wxChar* szRet = szOut; @@ -117,7 +117,7 @@ inline char* wxTmemcpy(char* szOut, const char* szIn, size_t len) { return (char*)memcpy(szOut, szIn, len); } inline char* wxTmemmove(char* szOut, const char* szIn, size_t len) { return (char*)memmove(szOut, szIn, len); } -inline char* wxTmemset(char* szOut, const char cIn, size_t len) +inline char* wxTmemset(char* szOut, char cIn, size_t len) { return (char*)memset(szOut, cIn, len); } diff --git a/include/wx/zstream.h b/include/wx/zstream.h index ec07bcb8ac..d7391440a7 100644 --- a/include/wx/zstream.h +++ b/include/wx/zstream.h @@ -44,7 +44,7 @@ class WXDLLIMPEXP_BASE wxZlibInputStream: public wxFilterInputStream { static bool CanHandleGZip(); - bool SetDictionary(const char *data, const size_t datalen); + bool SetDictionary(const char *data, size_t datalen); bool SetDictionary(const wxMemoryBuffer &buf); protected: @@ -75,7 +75,7 @@ class WXDLLIMPEXP_BASE wxZlibOutputStream: public wxFilterOutputStream { static bool CanHandleGZip(); - bool SetDictionary(const char *data, const size_t datalen); + bool SetDictionary(const char *data, size_t datalen); bool SetDictionary(const wxMemoryBuffer &buf); protected: diff --git a/interface/wx/calctrl.h b/interface/wx/calctrl.h index a59e64f5e0..688c7fdf91 100644 --- a/interface/wx/calctrl.h +++ b/interface/wx/calctrl.h @@ -62,7 +62,7 @@ public: Sets the week day carried by the event, normally only used by the library internally. */ - void SetWeekDay(const wxDateTime::WeekDay day); + void SetWeekDay(wxDateTime::WeekDay day); }; wxEventType wxEVT_CALENDAR_SEL_CHANGED; diff --git a/interface/wx/dirctrl.h b/interface/wx/dirctrl.h index 71ca5bb183..dc43e1d6d1 100644 --- a/interface/wx/dirctrl.h +++ b/interface/wx/dirctrl.h @@ -98,7 +98,7 @@ public: @param name The window name. */ - wxGenericDirCtrl(wxWindow* parent, const wxWindowID id = wxID_ANY, + wxGenericDirCtrl(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -126,7 +126,7 @@ public: Create function for two-step construction. See wxGenericDirCtrl() for details. */ - bool Create(wxWindow* parent, const wxWindowID id = wxID_ANY, + bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -268,11 +268,11 @@ class wxDirFilterListCtrl: public wxChoice { public: wxDirFilterListCtrl(); - wxDirFilterListCtrl(wxGenericDirCtrl* parent, const wxWindowID id = wxID_ANY, + wxDirFilterListCtrl(wxGenericDirCtrl* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); - bool Create(wxGenericDirCtrl* parent, const wxWindowID id = wxID_ANY, + bool Create(wxGenericDirCtrl* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); diff --git a/interface/wx/html/helpwnd.h b/interface/wx/html/helpwnd.h index 870f8ad313..e2b17d7fbe 100644 --- a/interface/wx/html/helpwnd.h +++ b/interface/wx/html/helpwnd.h @@ -110,7 +110,7 @@ public: This form takes numeric ID as the parameter (uses an extension to MS format, param name="ID" value=id). */ - bool Display(const int id); + bool Display(int id); /** Displays contents panel. diff --git a/interface/wx/html/webkit.h b/interface/wx/html/webkit.h index 2caa7f4a80..dce5f0e5f5 100644 --- a/interface/wx/html/webkit.h +++ b/interface/wx/html/webkit.h @@ -124,7 +124,7 @@ class wxWebKitStateChangedEvent : public wxCommandEvent { public: int GetState(); - void SetState(const int state); + void SetState(int state); wxString GetURL(); void SetURL(const wxString& url); diff --git a/interface/wx/zstream.h b/interface/wx/zstream.h index 8319f3ae7d..47cfe02c1b 100644 --- a/interface/wx/zstream.h +++ b/interface/wx/zstream.h @@ -85,7 +85,7 @@ public: Returns @true if the dictionary was successfully set. */ - bool SetDictionary(const char *data, const size_t datalen); + bool SetDictionary(const char *data, size_t datalen); bool SetDictionary(const wxMemoryBuffer &buf); //@} }; @@ -144,7 +144,7 @@ public: Returns @true if the dictionary was successfully set. */ - bool SetDictionary(const char *data, const size_t datalen); + bool SetDictionary(const char *data, size_t datalen); bool SetDictionary(const wxMemoryBuffer &buf); //@} }; diff --git a/src/common/memory.cpp b/src/common/memory.cpp index eb8155c36e..f31d76136f 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -490,7 +490,7 @@ char * wxDebugContext::CallerMemPos (const char * buf) } -char * wxDebugContext::EndMarkerPos (const char * buf, const size_t size) +char * wxDebugContext::EndMarkerPos (const char * buf, size_t size) { return CallerMemPos (buf) + PaddedSize (size); } @@ -517,13 +517,13 @@ char * wxDebugContext::StartPos (const char * caller) // Note: this function is now obsolete (along with CalcAlignment) // because the calculations are done statically, for greater speed. */ -size_t wxDebugContext::GetPadding (const size_t size) +size_t wxDebugContext::GetPadding (size_t size) { size_t pad = size % CalcAlignment (); return (pad) ? sizeof(wxMarkerType) - pad : 0; } -size_t wxDebugContext::PaddedSize (const size_t size) +size_t wxDebugContext::PaddedSize (size_t size) { // Added by Terry Farnham to replace // slow GetPadding call. @@ -541,7 +541,7 @@ size_t wxDebugContext::PaddedSize (const size_t size) in order to satisfy a caller request. This includes space for the struct plus markers and the caller's memory as well. */ -size_t wxDebugContext::TotSize (const size_t reqSize) +size_t wxDebugContext::TotSize (size_t reqSize) { return (PaddedSize (sizeof (wxMemStruct)) + PaddedSize (reqSize) + 2 * sizeof(wxMarkerType)); diff --git a/src/common/zstream.cpp b/src/common/zstream.cpp index bf4c53cf3d..8ae6c1c466 100644 --- a/src/common/zstream.cpp +++ b/src/common/zstream.cpp @@ -266,7 +266,7 @@ size_t wxZlibInputStream::OnSysRead(void *buffer, size_t size) return major > 1 || (major == 1 && minor >= 2); } -bool wxZlibInputStream::SetDictionary(const char *data, const size_t datalen) +bool wxZlibInputStream::SetDictionary(const char *data, size_t datalen) { return (inflateSetDictionary(m_inflate, (Bytef*)data, datalen) == Z_OK); } @@ -437,7 +437,7 @@ size_t wxZlibOutputStream::OnSysWrite(const void *buffer, size_t size) return wxZlibInputStream::CanHandleGZip(); } -bool wxZlibOutputStream::SetDictionary(const char *data, const size_t datalen) +bool wxZlibOutputStream::SetDictionary(const char *data, size_t datalen) { return (deflateSetDictionary(m_deflate, (Bytef*)data, datalen) == Z_OK); } diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 1b0d774b11..93a92facc2 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -371,7 +371,7 @@ void wxGenericDirCtrl::ExpandRoot() } bool wxGenericDirCtrl::Create(wxWindow *parent, - const wxWindowID treeid, + wxWindowID treeid, const wxString& dir, const wxPoint& pos, const wxSize& size, @@ -1272,7 +1272,7 @@ wxBEGIN_EVENT_TABLE(wxDirFilterListCtrl, wxChoice) wxEND_EVENT_TABLE() bool wxDirFilterListCtrl::Create(wxGenericDirCtrl* parent, - const wxWindowID treeid, + wxWindowID treeid, const wxPoint& pos, const wxSize& size, long style) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index c7c26a9bfb..ac80d27ff3 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -4630,7 +4630,7 @@ wxGrid::SendGridSizeEvent(wxEventType type, // +1 if the event was processed (but not vetoed) // 0 if the event wasn't handled int -wxGrid::SendEvent(const wxEventType type, +wxGrid::SendEvent(wxEventType type, int row, int col, const wxMouseEvent& mouseEv) { @@ -4705,7 +4705,7 @@ wxGrid::SendEvent(const wxEventType type, // Generate a grid event of specified type, return value same as above // int -wxGrid::SendEvent(const wxEventType type, int row, int col, const wxString& s) +wxGrid::SendEvent(wxEventType type, int row, int col, const wxString& s) { wxGridEvent gridEvt( GetId(), type, this, row, col ); gridEvt.SetString(s); diff --git a/src/html/helpwnd.cpp b/src/html/helpwnd.cpp index 2a593b0801..b7340cccf4 100644 --- a/src/html/helpwnd.cpp +++ b/src/html/helpwnd.cpp @@ -701,7 +701,7 @@ bool wxHtmlHelpWindow::Display(const wxString& x) return false; } -bool wxHtmlHelpWindow::Display(const int id) +bool wxHtmlHelpWindow::Display(int id) { wxString url = m_Data->FindPageById(id); if (!url.empty()) diff --git a/src/qt/converter.cpp b/src/qt/converter.cpp index 334c41d131..fbc14a34c3 100644 --- a/src/qt/converter.cpp +++ b/src/qt/converter.cpp @@ -142,7 +142,7 @@ wxOrientation wxQtConvertOrientation( Qt::Orientation qtOrientation ) /* Auxiliar function for key events. Returns the wx keycode for a qt one. * The event is needed to check it flags (numpad key or not) */ -wxKeyCode wxQtConvertKeyCode( int key, const Qt::KeyboardModifiers modifiers ) +wxKeyCode wxQtConvertKeyCode( int key, Qt::KeyboardModifiers modifiers ) { /* First treat common ranges and then handle specific values * The macro takes Qt first and last codes and the first wx code