remove const from pass-by-value parameters
This commit is contained in:
@@ -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); }
|
||||
|
@@ -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();
|
||||
};
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -108,7 +108,7 @@ public:
|
||||
|
||||
// Alternative version that works with numeric ID.
|
||||
// (uses extension to MS format, <param name="ID" value=id>, see docs)
|
||||
bool Display(const int id);
|
||||
bool Display(int id);
|
||||
|
||||
// Displays help window and focuses contents.
|
||||
bool DisplayContents();
|
||||
|
@@ -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; }
|
||||
|
||||
|
@@ -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.
|
||||
|
@@ -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);
|
||||
|
@@ -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 );
|
||||
|
||||
|
@@ -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 ); }
|
||||
|
@@ -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); }
|
||||
|
||||
|
||||
|
@@ -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:
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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.
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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);
|
||||
//@}
|
||||
};
|
||||
|
@@ -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 <TJRT@pacbell.net> 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));
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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)
|
||||
|
@@ -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);
|
||||
|
@@ -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())
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user