added const for constant char pointer function parameters
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -63,7 +63,7 @@ WXDLLEXPORT_DATA(extern wxChar*) wxBuffer;
|
|||||||
WXDLLEXPORT wxChar* copystring(const wxChar *s);
|
WXDLLEXPORT wxChar* copystring(const wxChar *s);
|
||||||
|
|
||||||
// Matches string one within string two regardless of case
|
// Matches string one within string two regardless of case
|
||||||
WXDLLEXPORT bool StringMatch(wxChar *one, wxChar *two, bool subString = TRUE, bool exact = FALSE);
|
WXDLLEXPORT bool StringMatch(const wxChar *one, const wxChar *two, bool subString = TRUE, bool exact = FALSE);
|
||||||
|
|
||||||
// A shorter way of using strcmp
|
// A shorter way of using strcmp
|
||||||
#define wxStringEq(s1, s2) (s1 && s2 && (wxStrcmp(s1, s2) == 0))
|
#define wxStringEq(s1, s2) (s1 && s2 && (wxStrcmp(s1, s2) == 0))
|
||||||
@@ -123,12 +123,12 @@ WXDLLEXPORT long wxGetCurrentId();
|
|||||||
WXDLLEXPORT_DATA(extern const wxChar*) wxFloatToStringStr;
|
WXDLLEXPORT_DATA(extern const wxChar*) wxFloatToStringStr;
|
||||||
WXDLLEXPORT_DATA(extern const wxChar*) wxDoubleToStringStr;
|
WXDLLEXPORT_DATA(extern const wxChar*) wxDoubleToStringStr;
|
||||||
|
|
||||||
WXDLLEXPORT void StringToFloat(wxChar *s, float *number);
|
WXDLLEXPORT void StringToFloat(const wxChar *s, float *number);
|
||||||
WXDLLEXPORT wxChar* FloatToString(float number, const wxChar *fmt = wxFloatToStringStr);
|
WXDLLEXPORT wxChar* FloatToString(float number, const wxChar *fmt = wxFloatToStringStr);
|
||||||
WXDLLEXPORT void StringToDouble(wxChar *s, double *number);
|
WXDLLEXPORT void StringToDouble(const wxChar *s, double *number);
|
||||||
WXDLLEXPORT wxChar* DoubleToString(double number, const wxChar *fmt = wxDoubleToStringStr);
|
WXDLLEXPORT wxChar* DoubleToString(double number, const wxChar *fmt = wxDoubleToStringStr);
|
||||||
WXDLLEXPORT void StringToInt(wxChar *s, int *number);
|
WXDLLEXPORT void StringToInt(const wxChar *s, int *number);
|
||||||
WXDLLEXPORT void StringToLong(wxChar *s, long *number);
|
WXDLLEXPORT void StringToLong(const wxChar *s, long *number);
|
||||||
WXDLLEXPORT wxChar* IntToString(int number);
|
WXDLLEXPORT wxChar* IntToString(int number);
|
||||||
WXDLLEXPORT wxChar* LongToString(long number);
|
WXDLLEXPORT wxChar* LongToString(long number);
|
||||||
|
|
||||||
@@ -287,7 +287,7 @@ WXDLLEXPORT bool wxGetDiskSpace(const wxString& path,
|
|||||||
// Menu accelerators related things
|
// Menu accelerators related things
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
WXDLLEXPORT wxChar* wxStripMenuCodes(wxChar *in, wxChar *out = (wxChar *) NULL);
|
WXDLLEXPORT wxChar* wxStripMenuCodes(const wxChar *in, wxChar *out = (wxChar *) NULL);
|
||||||
WXDLLEXPORT wxString wxStripMenuCodes(const wxString& str);
|
WXDLLEXPORT wxString wxStripMenuCodes(const wxString& str);
|
||||||
|
|
||||||
#if wxUSE_ACCEL
|
#if wxUSE_ACCEL
|
||||||
|
@@ -249,14 +249,14 @@ wxRegisterId (long id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
StringToFloat (wxChar *s, float *number)
|
StringToFloat (const wxChar *s, float *number)
|
||||||
{
|
{
|
||||||
if (s && *s && number)
|
if (s && *s && number)
|
||||||
*number = (float) wxStrtod (s, (wxChar **) NULL);
|
*number = (float) wxStrtod (s, (wxChar **) NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
StringToDouble (wxChar *s, double *number)
|
StringToDouble (const wxChar *s, double *number)
|
||||||
{
|
{
|
||||||
if (s && *s && number)
|
if (s && *s && number)
|
||||||
*number = wxStrtod (s, (wxChar **) NULL);
|
*number = wxStrtod (s, (wxChar **) NULL);
|
||||||
@@ -281,14 +281,14 @@ DoubleToString (double number, const wxChar *fmt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
StringToInt (wxChar *s, int *number)
|
StringToInt (const wxChar *s, int *number)
|
||||||
{
|
{
|
||||||
if (s && *s && number)
|
if (s && *s && number)
|
||||||
*number = (int) wxStrtol (s, (wxChar **) NULL, 10);
|
*number = (int) wxStrtol (s, (wxChar **) NULL, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
StringToLong (wxChar *s, long *number)
|
StringToLong (const wxChar *s, long *number)
|
||||||
{
|
{
|
||||||
if (s && *s && number)
|
if (s && *s && number)
|
||||||
*number = wxStrtol (s, (wxChar **) NULL, 10);
|
*number = wxStrtol (s, (wxChar **) NULL, 10);
|
||||||
@@ -353,7 +353,7 @@ wxString wxDecToHex(int dec)
|
|||||||
|
|
||||||
// Match a string INDEPENDENT OF CASE
|
// Match a string INDEPENDENT OF CASE
|
||||||
bool
|
bool
|
||||||
StringMatch (char *str1, char *str2, bool subString, bool exact)
|
StringMatch (const char *str1, const char *str2, bool subString, bool exact)
|
||||||
{
|
{
|
||||||
if (str1 == NULL || str2 == NULL)
|
if (str1 == NULL || str2 == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -409,7 +409,7 @@ wxString wxNow()
|
|||||||
// Menu accelerators related functions
|
// Menu accelerators related functions
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxChar *wxStripMenuCodes(wxChar *in, wxChar *out)
|
wxChar *wxStripMenuCodes(const wxChar *in, wxChar *out)
|
||||||
{
|
{
|
||||||
wxString s = wxMenuItem::GetLabelFromText(in);
|
wxString s = wxMenuItem::GetLabelFromText(in);
|
||||||
if ( out )
|
if ( out )
|
||||||
|
Reference in New Issue
Block a user