make array data fully const
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -128,8 +128,8 @@ WXDLLIMPEXP_BASE struct tm *wxGmtime_r(const time_t*, struct tm*);
|
||||
// wxInvalidDateTime)
|
||||
class WXDLLIMPEXP_FWD_BASE wxDateTime;
|
||||
|
||||
extern WXDLLIMPEXP_DATA_BASE(const char *) wxDefaultDateTimeFormat;
|
||||
extern WXDLLIMPEXP_DATA_BASE(const char *) wxDefaultTimeSpanFormat;
|
||||
extern WXDLLIMPEXP_DATA_BASE(const char) wxDefaultDateTimeFormat[];
|
||||
extern WXDLLIMPEXP_DATA_BASE(const char) wxDefaultTimeSpanFormat[];
|
||||
extern WXDLLIMPEXP_DATA_BASE(const wxDateTime) wxDefaultDateTime;
|
||||
|
||||
#define wxInvalidDateTime wxDefaultDateTime
|
||||
|
@@ -257,10 +257,10 @@ protected:
|
||||
|
||||
// Special constructors to be used by derived classes.
|
||||
wxSystemColourProperty( const wxString& label, const wxString& name,
|
||||
const wxChar** labels, const long* values, wxPGChoices* choicesCache,
|
||||
const wxChar* const* labels, const long* values, wxPGChoices* choicesCache,
|
||||
const wxColourPropertyValue& value );
|
||||
wxSystemColourProperty( const wxString& label, const wxString& name,
|
||||
const wxChar** labels, const long* values, wxPGChoices* choicesCache,
|
||||
const wxChar* const* labels, const long* values, wxPGChoices* choicesCache,
|
||||
const wxColour& value );
|
||||
|
||||
void Init( int type, const wxColour& colour );
|
||||
|
@@ -818,7 +818,7 @@ public:
|
||||
@param values
|
||||
Values for choices. If NULL, indexes are used.
|
||||
*/
|
||||
wxPGChoices( const wxChar** labels, const long* values = NULL )
|
||||
wxPGChoices( const wxChar* const* labels, const long* values = NULL )
|
||||
{
|
||||
Init();
|
||||
Set(labels,values);
|
||||
@@ -866,7 +866,7 @@ public:
|
||||
@param values
|
||||
Values for added choices. If empty, relevant entry indexes are used.
|
||||
*/
|
||||
void Add( const wxChar** labels, const ValArrItem* values = NULL );
|
||||
void Add( const wxChar* const* labels, const ValArrItem* values = NULL );
|
||||
|
||||
/** Version that works with wxArrayString and wxArrayInt. */
|
||||
void Add( const wxArrayString& arr, const wxArrayInt& arrint = wxArrayInt() );
|
||||
@@ -994,7 +994,7 @@ public:
|
||||
|
||||
#ifndef SWIG
|
||||
/** Does not create copies for itself. */
|
||||
void Set( const wxChar** labels, const long* values = NULL )
|
||||
void Set( const wxChar* const* labels, const long* values = NULL )
|
||||
{
|
||||
Free();
|
||||
Add(labels,values);
|
||||
@@ -2067,7 +2067,7 @@ public:
|
||||
return m_validator;
|
||||
return DoGetValidator();
|
||||
}
|
||||
#endif // #if wxUSE_VALIDATORS
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
#ifndef SWIG
|
||||
/** Returns client data (void*) of a property.
|
||||
|
@@ -370,7 +370,7 @@ public:
|
||||
#ifndef SWIG
|
||||
wxEnumProperty( const wxString& label = wxPG_LABEL,
|
||||
const wxString& name = wxPG_LABEL,
|
||||
const wxChar** labels = NULL,
|
||||
const wxChar* const* labels = NULL,
|
||||
const long* values = NULL,
|
||||
int value = 0 );
|
||||
wxEnumProperty( const wxString& label,
|
||||
@@ -381,7 +381,7 @@ public:
|
||||
// Special constructor for caching choices (used by derived class)
|
||||
wxEnumProperty( const wxString& label,
|
||||
const wxString& name,
|
||||
const wxChar** labels,
|
||||
const wxChar* const* labels,
|
||||
const long* values,
|
||||
wxPGChoices* choicesCache,
|
||||
int value = 0 );
|
||||
@@ -468,7 +468,7 @@ public:
|
||||
|
||||
wxEditEnumProperty( const wxString& label,
|
||||
const wxString& name,
|
||||
const wxChar** labels,
|
||||
const wxChar* const* labels,
|
||||
const long* values,
|
||||
const wxString& value );
|
||||
wxEditEnumProperty( const wxString& label = wxPG_LABEL,
|
||||
@@ -484,7 +484,7 @@ public:
|
||||
// Special constructor for caching choices (used by derived class)
|
||||
wxEditEnumProperty( const wxString& label,
|
||||
const wxString& name,
|
||||
const wxChar** labels,
|
||||
const wxChar* const* labels,
|
||||
const long* values,
|
||||
wxPGChoices* choicesCache,
|
||||
const wxString& value );
|
||||
@@ -514,7 +514,7 @@ public:
|
||||
#ifndef SWIG
|
||||
wxFlagsProperty( const wxString& label,
|
||||
const wxString& name,
|
||||
const wxChar** labels,
|
||||
const wxChar* const* labels,
|
||||
const long* values = NULL,
|
||||
long value = 0 );
|
||||
wxFlagsProperty( const wxString& label,
|
||||
|
@@ -185,8 +185,8 @@ wxAuiDefaultToolBarArt::wxAuiDefaultToolBarArt()
|
||||
m_gripper_pen2 = wxPen(darker3_colour);
|
||||
m_gripper_pen3 = *wxWHITE_PEN;
|
||||
|
||||
static unsigned char button_dropdown_bits[] = { 0xe0, 0xf1, 0xfb };
|
||||
static unsigned char overflow_bits[] = { 0x80, 0xff, 0x80, 0xc1, 0xe3, 0xf7 };
|
||||
static const unsigned char button_dropdown_bits[] = { 0xe0, 0xf1, 0xfb };
|
||||
static const unsigned char overflow_bits[] = { 0x80, 0xff, 0x80, 0xc1, 0xe3, 0xf7 };
|
||||
|
||||
m_button_dropdown_bmp = wxAuiBitmapFromBits(button_dropdown_bits, 5, 3,
|
||||
*wxBLACK);
|
||||
|
@@ -145,33 +145,33 @@ private:
|
||||
// -- bitmaps --
|
||||
|
||||
#if defined( __WXMAC__ )
|
||||
static unsigned char close_bits[]={
|
||||
static const unsigned char close_bits[]={
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFE, 0x03, 0xF8, 0x01, 0xF0, 0x19, 0xF3,
|
||||
0xB8, 0xE3, 0xF0, 0xE1, 0xE0, 0xE0, 0xF0, 0xE1, 0xB8, 0xE3, 0x19, 0xF3,
|
||||
0x01, 0xF0, 0x03, 0xF8, 0x0F, 0xFE, 0xFF, 0xFF };
|
||||
#elif defined( __WXGTK__)
|
||||
static unsigned char close_bits[]={
|
||||
static const unsigned char close_bits[]={
|
||||
0xff, 0xff, 0xff, 0xff, 0x07, 0xf0, 0xfb, 0xef, 0xdb, 0xed, 0x8b, 0xe8,
|
||||
0x1b, 0xec, 0x3b, 0xee, 0x1b, 0xec, 0x8b, 0xe8, 0xdb, 0xed, 0xfb, 0xef,
|
||||
0x07, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||
#else
|
||||
static unsigned char close_bits[]={
|
||||
static const unsigned char close_bits[]={
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xf3, 0xcf, 0xf9,
|
||||
0x9f, 0xfc, 0x3f, 0xfe, 0x3f, 0xfe, 0x9f, 0xfc, 0xcf, 0xf9, 0xe7, 0xf3,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
#endif
|
||||
|
||||
static unsigned char left_bits[] = {
|
||||
static const unsigned char left_bits[] = {
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xfe, 0x3f, 0xfe,
|
||||
0x1f, 0xfe, 0x0f, 0xfe, 0x1f, 0xfe, 0x3f, 0xfe, 0x7f, 0xfe, 0xff, 0xfe,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
|
||||
static unsigned char right_bits[] = {
|
||||
static const unsigned char right_bits[] = {
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0x9f, 0xff, 0x1f, 0xff,
|
||||
0x1f, 0xfe, 0x1f, 0xfc, 0x1f, 0xfe, 0x1f, 0xff, 0x9f, 0xff, 0xdf, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
|
||||
static unsigned char list_bits[] = {
|
||||
static const unsigned char list_bits[] = {
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x0f, 0xf8, 0xff, 0xff, 0x0f, 0xf8, 0x1f, 0xfc, 0x3f, 0xfe, 0x7f, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
|
@@ -247,17 +247,17 @@ wxAuiDefaultDockArt::wxAuiDefaultDockArt()
|
||||
|
||||
// some built in bitmaps
|
||||
#if defined( __WXMAC__ )
|
||||
static unsigned char close_bits[]={
|
||||
static const unsigned char close_bits[]={
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFE, 0x03, 0xF8, 0x01, 0xF0, 0x19, 0xF3,
|
||||
0xB8, 0xE3, 0xF0, 0xE1, 0xE0, 0xE0, 0xF0, 0xE1, 0xB8, 0xE3, 0x19, 0xF3,
|
||||
0x01, 0xF0, 0x03, 0xF8, 0x0F, 0xFE, 0xFF, 0xFF };
|
||||
#elif defined(__WXGTK__)
|
||||
static unsigned char close_bits[]={
|
||||
static const unsigned char close_bits[]={
|
||||
0xff, 0xff, 0xff, 0xff, 0x07, 0xf0, 0xfb, 0xef, 0xdb, 0xed, 0x8b, 0xe8,
|
||||
0x1b, 0xec, 0x3b, 0xee, 0x1b, 0xec, 0x8b, 0xe8, 0xdb, 0xed, 0xfb, 0xef,
|
||||
0x07, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||
#else
|
||||
static unsigned char close_bits[]={
|
||||
static const unsigned char close_bits[]={
|
||||
// reduced height, symmetric
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xf3, 0x9f, 0xf9,
|
||||
0x3f, 0xfc, 0x7f, 0xfe, 0x3f, 0xfc, 0x9f, 0xf9, 0xcf, 0xf3, 0xff, 0xff,
|
||||
@@ -270,17 +270,17 @@ wxAuiDefaultDockArt::wxAuiDefaultDockArt()
|
||||
*/
|
||||
#endif
|
||||
|
||||
static unsigned char maximize_bits[] = {
|
||||
static const unsigned char maximize_bits[] = {
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf0, 0xf7, 0xf7, 0x07, 0xf0,
|
||||
0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, 0x07, 0xf0,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
|
||||
static unsigned char restore_bits[]={
|
||||
static const unsigned char restore_bits[]={
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf0, 0x1f, 0xf0, 0xdf, 0xf7,
|
||||
0x07, 0xf4, 0x07, 0xf4, 0xf7, 0xf5, 0xf7, 0xf1, 0xf7, 0xfd, 0xf7, 0xfd,
|
||||
0x07, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
|
||||
static unsigned char pin_bits[]={
|
||||
static const unsigned char pin_bits[]={
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xfc,0xdf,0xfc,0xdf,0xfc,
|
||||
0xdf,0xfc,0xdf,0xfc,0xdf,0xfc,0x0f,0xf8,0x7f,0xff,0x7f,0xff,
|
||||
0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
|
@@ -323,8 +323,8 @@ const long wxDateTime::TIME_T_FACTOR = 1000l;
|
||||
// global data
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
const char *wxDefaultDateTimeFormat = "%c";
|
||||
const char *wxDefaultTimeSpanFormat = "%H:%M:%S";
|
||||
const char wxDefaultDateTimeFormat[] = "%c";
|
||||
const char wxDefaultTimeSpanFormat[] = "%H:%M:%S";
|
||||
|
||||
// in the fine tradition of ANSI C we use our equivalent of (time_t)-1 to
|
||||
// indicate an invalid wxDateTime object
|
||||
@@ -356,7 +356,7 @@ wxDateTime::wxDateTime_t GetNumOfDaysInMonth(int year, wxDateTime::Month month)
|
||||
{
|
||||
// the number of days in month in Julian/Gregorian calendar: the first line
|
||||
// is for normal years, the second one is for the leap ones
|
||||
static wxDateTime::wxDateTime_t daysInMonth[2][MONTHS_IN_YEAR] =
|
||||
static const wxDateTime::wxDateTime_t daysInMonth[2][MONTHS_IN_YEAR] =
|
||||
{
|
||||
{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
|
||||
{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
|
||||
@@ -820,7 +820,7 @@ wxString wxDateTime::GetEnglishMonthName(Month month, NameFlags flags)
|
||||
{
|
||||
wxCHECK_MSG( month != Inv_Month, wxEmptyString, "invalid month" );
|
||||
|
||||
static const char *monthNames[2][MONTHS_IN_YEAR] =
|
||||
static const char *const monthNames[2][MONTHS_IN_YEAR] =
|
||||
{
|
||||
{ "January", "February", "March", "April", "May", "June",
|
||||
"July", "August", "September", "October", "November", "December" },
|
||||
@@ -859,7 +859,7 @@ wxString wxDateTime::GetEnglishWeekDayName(WeekDay wday, NameFlags flags)
|
||||
{
|
||||
wxCHECK_MSG( wday != Inv_WeekDay, wxEmptyString, wxT("invalid weekday") );
|
||||
|
||||
static const char *weekdayNames[2][DAYS_PER_WEEK] =
|
||||
static const char *const weekdayNames[2][DAYS_PER_WEEK] =
|
||||
{
|
||||
{ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
|
||||
"Saturday" },
|
||||
|
@@ -1760,7 +1760,7 @@ wxDateTime::ParseDate(const wxString& date, wxString::const_iterator *end)
|
||||
else // not a valid weekday name
|
||||
{
|
||||
// try the ordinals
|
||||
static const char *ordinals[] =
|
||||
static const char *const ordinals[] =
|
||||
{
|
||||
wxTRANSLATE("first"),
|
||||
wxTRANSLATE("second"),
|
||||
@@ -1937,7 +1937,7 @@ wxDateTime::ParseTime(const wxString& time, wxString::const_iterator *end)
|
||||
|
||||
// try all time formats we may think about in the order from longest to
|
||||
// shortest
|
||||
static const char *timeFormats[] =
|
||||
static const char *const timeFormats[] =
|
||||
{
|
||||
"%I:%M:%S %p", // 12hour with AM/PM
|
||||
"%H:%M:%S", // could be the same or 24 hour one so try it too
|
||||
|
@@ -55,7 +55,7 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// encodings supported by GetEncodingDescription
|
||||
static wxFontEncoding gs_encodings[] =
|
||||
static const wxFontEncoding gs_encodings[] =
|
||||
{
|
||||
wxFONTENCODING_ISO8859_1,
|
||||
wxFONTENCODING_ISO8859_2,
|
||||
@@ -144,7 +144,7 @@ static wxFontEncoding gs_encodings[] =
|
||||
};
|
||||
|
||||
// the descriptions for them
|
||||
static const char* gs_encodingDescs[] =
|
||||
static const char* const gs_encodingDescs[] =
|
||||
{
|
||||
wxTRANSLATE( "Western European (ISO-8859-1)" ),
|
||||
wxTRANSLATE( "Central European (ISO-8859-2)" ),
|
||||
@@ -240,7 +240,7 @@ static const char* gs_encodingDescs[] =
|
||||
};
|
||||
|
||||
// and the internal names (these are not translated on purpose!)
|
||||
static const wxChar* gs_encodingNames[WXSIZEOF(gs_encodingDescs)][9] =
|
||||
static const wxChar* const gs_encodingNames[WXSIZEOF(gs_encodingDescs)][9] =
|
||||
{
|
||||
// names from the columns correspond to these OS:
|
||||
// Linux Solaris and IRIX HP-UX AIX
|
||||
@@ -642,7 +642,7 @@ wxFontMapperBase::NonInteractiveCharsetToEncoding(const wxString& charset)
|
||||
|
||||
for ( size_t i = 0; i < WXSIZEOF(gs_encodingNames); ++i )
|
||||
{
|
||||
for ( const wxChar** encName = gs_encodingNames[i]; *encName; ++encName )
|
||||
for ( const wxChar* const* encName = gs_encodingNames[i]; *encName; ++encName )
|
||||
{
|
||||
if ( cs.CmpNoCase(*encName) == 0 )
|
||||
return gs_encodings[i];
|
||||
@@ -831,17 +831,17 @@ wxString wxFontMapperBase::GetEncodingName(wxFontEncoding encoding)
|
||||
/* static */
|
||||
const wxChar** wxFontMapperBase::GetAllEncodingNames(wxFontEncoding encoding)
|
||||
{
|
||||
static const wxChar* dummy[] = { NULL };
|
||||
static const wxChar* const dummy[] = { NULL };
|
||||
|
||||
for ( size_t i = 0; i < WXSIZEOF(gs_encodingNames); i++ )
|
||||
{
|
||||
if ( gs_encodings[i] == encoding )
|
||||
{
|
||||
return gs_encodingNames[i];
|
||||
return const_cast<const wxChar**>(gs_encodingNames[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return dummy;
|
||||
return const_cast<const wxChar**>(dummy);
|
||||
}
|
||||
|
||||
/* static */
|
||||
@@ -851,7 +851,7 @@ wxFontEncoding wxFontMapperBase::GetEncodingFromName(const wxString& name)
|
||||
|
||||
for ( size_t i = 0; i < count; i++ )
|
||||
{
|
||||
for ( const wxChar** encName = gs_encodingNames[i]; *encName; ++encName )
|
||||
for ( const wxChar* const* encName = gs_encodingNames[i]; *encName; ++encName )
|
||||
{
|
||||
if ( name.CmpNoCase(*encName) == 0 )
|
||||
return gs_encodings[i];
|
||||
|
@@ -2144,9 +2144,9 @@ wxMBConv_iconv::wxMBConv_iconv(const char *name)
|
||||
wxLogTrace(TRACE_STRCONV, wxT("Looking for wide char codeset:"));
|
||||
|
||||
#if wxUSE_FONTMAP
|
||||
const wxChar **names = wxFontMapperBase::GetAllEncodingNames(WC_ENC);
|
||||
const wxChar *const *names = wxFontMapperBase::GetAllEncodingNames(WC_ENC);
|
||||
#else // !wxUSE_FONTMAP
|
||||
static const wxChar *names_static[] =
|
||||
static const wxChar *const names_static[] =
|
||||
{
|
||||
#if SIZEOF_WCHAR_T == 4
|
||||
wxT("UCS-4"),
|
||||
@@ -2155,7 +2155,7 @@ wxMBConv_iconv::wxMBConv_iconv(const char *name)
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
const wxChar **names = names_static;
|
||||
const wxChar *const *names = names_static;
|
||||
#endif // wxUSE_FONTMAP/!wxUSE_FONTMAP
|
||||
|
||||
for ( ; *names && ms_wcCharsetName.empty(); ++names )
|
||||
@@ -3068,7 +3068,7 @@ wxMBConv *wxCSConv::DoCreate() const
|
||||
delete conv;
|
||||
}
|
||||
|
||||
const wxChar** names = wxFontMapperBase::GetAllEncodingNames(encoding);
|
||||
const wxChar* const* names = wxFontMapperBase::GetAllEncodingNames(encoding);
|
||||
// CS : in case this does not return valid names (eg for MacRoman)
|
||||
// encoding got a 'failure' entry in the cache all the same,
|
||||
// although it just has to be created using a different method, so
|
||||
|
@@ -110,7 +110,7 @@
|
||||
// ============================================================================
|
||||
|
||||
// Array used in DecToHex conversion routine.
|
||||
static wxChar hexArray[] = wxT("0123456789ABCDEF");
|
||||
static const wxChar hexArray[] = wxT("0123456789ABCDEF");
|
||||
|
||||
// Convert 2-digit hex number to decimal
|
||||
int wxHexToDec(const wxString& buf)
|
||||
|
@@ -194,7 +194,7 @@ void wxXLocale::Free()
|
||||
#define CTYPE_UPPER 0x0200
|
||||
#define CTYPE_XDIGIT 0x0400
|
||||
|
||||
static unsigned int gs_lookup[] =
|
||||
static const unsigned int gs_lookup[] =
|
||||
{
|
||||
0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004,
|
||||
0x0004, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0004, 0x0004,
|
||||
|
@@ -618,7 +618,7 @@ static bool GetRGBFromName(const char *inname, bool *isNone,
|
||||
|
||||
static const char *ParseColor(const char *data)
|
||||
{
|
||||
static const char *targets[] =
|
||||
static const char *const targets[] =
|
||||
{"c ", "g ", "g4 ", "m ", "b ", "s ", NULL};
|
||||
|
||||
const char *p, *r;
|
||||
|
@@ -58,7 +58,7 @@ END_EVENT_TABLE()
|
||||
|
||||
// don't change the number of elements (48) in this array, the code below is
|
||||
// hardcoded to use it
|
||||
static const wxChar *wxColourDialogNames[] =
|
||||
static const wxChar *const wxColourDialogNames[] =
|
||||
{
|
||||
wxT("ORANGE"),
|
||||
wxT("GOLDENROD"),
|
||||
@@ -380,7 +380,7 @@ void wxGenericColourDialog::PaintBasicColours(wxDC& dc)
|
||||
int y = (i*(m_smallRectangleSize.y+m_gridSpacing) + m_standardColoursRect.y);
|
||||
|
||||
dc.SetPen(*wxBLACK_PEN);
|
||||
wxBrush brush(m_standardColours[ptr], wxSOLID);
|
||||
wxBrush brush(m_standardColours[ptr]);
|
||||
dc.SetBrush(brush);
|
||||
|
||||
dc.DrawRectangle( x, y, m_smallRectangleSize.x, m_smallRectangleSize.y);
|
||||
@@ -403,7 +403,7 @@ void wxGenericColourDialog::PaintCustomColours(wxDC& dc)
|
||||
|
||||
dc.SetPen(*wxBLACK_PEN);
|
||||
|
||||
wxBrush brush(m_customColours[ptr], wxSOLID);
|
||||
wxBrush brush(m_customColours[ptr]);
|
||||
dc.SetBrush(brush);
|
||||
|
||||
dc.DrawRectangle( x, y, m_smallRectangleSize.x, m_smallRectangleSize.y);
|
||||
@@ -461,7 +461,7 @@ void wxGenericColourDialog::PaintCustomColour(wxDC& dc)
|
||||
{
|
||||
dc.SetPen(*wxBLACK_PEN);
|
||||
|
||||
wxBrush *brush = new wxBrush(m_colourData.m_dataColour, wxSOLID);
|
||||
wxBrush *brush = new wxBrush(m_colourData.m_dataColour);
|
||||
dc.SetBrush(*brush);
|
||||
|
||||
dc.DrawRectangle( m_singleCustomColourRect.x, m_singleCustomColourRect.y,
|
||||
|
@@ -190,7 +190,7 @@ static const char *wxPostScriptHeaderColourImage = "\
|
||||
} ifelse % end of 'false' case\n\
|
||||
";
|
||||
|
||||
static char wxPostScriptHeaderReencodeISO1[] =
|
||||
static const char wxPostScriptHeaderReencodeISO1[] =
|
||||
"\n/reencodeISO {\n"
|
||||
"dup dup findfont dup length dict begin\n"
|
||||
"{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n"
|
||||
@@ -214,7 +214,7 @@ static char wxPostScriptHeaderReencodeISO1[] =
|
||||
"/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve\n"
|
||||
"/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut\n";
|
||||
|
||||
static char wxPostScriptHeaderReencodeISO2[] =
|
||||
static const char wxPostScriptHeaderReencodeISO2[] =
|
||||
"/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar\n"
|
||||
"/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot\n"
|
||||
"/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior\n"
|
||||
@@ -962,7 +962,7 @@ void wxPostScriptDCImpl::DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y )
|
||||
}
|
||||
|
||||
/* this has to be char, not wxChar */
|
||||
static char hexArray[] = "0123456789ABCDEF";
|
||||
static const char hexArray[] = "0123456789ABCDEF";
|
||||
|
||||
void wxPostScriptDCImpl::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool WXUNUSED(useMask) )
|
||||
{
|
||||
|
@@ -1414,7 +1414,7 @@ void wxDirFilterListCtrl::FillFilterList(const wxString& filter, int defaultFilt
|
||||
|
||||
#ifndef __WXGTK20__
|
||||
/* Computer (c) Julian Smart */
|
||||
static const char * file_icons_tbl_computer_xpm[] = {
|
||||
static const char* const file_icons_tbl_computer_xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 42 1",
|
||||
"r c #4E7FD0",
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
||||
const char wxEditableListBoxNameStr[] = "editableListBox";
|
||||
|
||||
static const char * eledit_xpm[] = {
|
||||
static const char* const eledit_xpm[] = {
|
||||
"16 16 3 1",
|
||||
" c None",
|
||||
". c #000000",
|
||||
@@ -54,7 +54,7 @@ static const char * eledit_xpm[] = {
|
||||
" ",
|
||||
" "};
|
||||
|
||||
static const char * elnew_xpm[] = {
|
||||
static const char* const elnew_xpm[] = {
|
||||
"16 16 5 1",
|
||||
" c None",
|
||||
". c #7F7F7F",
|
||||
@@ -78,7 +78,7 @@ static const char * elnew_xpm[] = {
|
||||
" ",
|
||||
" "};
|
||||
|
||||
static const char * eldel_xpm[] = {
|
||||
static const char* const eldel_xpm[] = {
|
||||
"16 16 3 1",
|
||||
" c None",
|
||||
". c #7F0000",
|
||||
@@ -100,7 +100,7 @@ static const char * eldel_xpm[] = {
|
||||
" . . ",
|
||||
" "};
|
||||
|
||||
static const char * eldown_xpm[] = {
|
||||
static const char* const eldown_xpm[] = {
|
||||
"16 16 2 1",
|
||||
" c None",
|
||||
". c #000000",
|
||||
@@ -121,7 +121,7 @@ static const char * eldown_xpm[] = {
|
||||
" ",
|
||||
" "};
|
||||
|
||||
static const char * elup_xpm[] = {
|
||||
static const char* const elup_xpm[] = {
|
||||
"16 16 2 1",
|
||||
" c None",
|
||||
". c #000000",
|
||||
|
@@ -3582,7 +3582,7 @@ void wxGrid::ChangeCursorMode(CursorMode mode,
|
||||
bool captureMouse)
|
||||
{
|
||||
#if wxUSE_LOG_TRACE
|
||||
static const wxChar *cursorModes[] =
|
||||
static const wxChar *const cursorModes[] =
|
||||
{
|
||||
wxT("SELECT_CELL"),
|
||||
wxT("RESIZE_ROW"),
|
||||
|
@@ -817,7 +817,7 @@ void wxLogDialog::CreateDetailsControls(wxWindow *parent)
|
||||
wxImageList *imageList = new wxImageList(ICON_SIZE, ICON_SIZE);
|
||||
|
||||
// order should be the same as in the switch below!
|
||||
static const wxChar* icons[] =
|
||||
static const wxChar* const icons[] =
|
||||
{
|
||||
wxART_ERROR,
|
||||
wxART_WARNING,
|
||||
|
@@ -458,7 +458,7 @@ wxDialog(parent, wxID_ANY, _("Print Setup"), wxPoint(0,0), wxSize(600, 600), wxD
|
||||
}
|
||||
|
||||
/* XPM */
|
||||
static const char * check_xpm[] = {
|
||||
static const char* const check_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"16 16 3 1",
|
||||
/* colors */
|
||||
|
@@ -2811,7 +2811,7 @@ bool wxRichEditModule::Load(Version version)
|
||||
return true;
|
||||
}
|
||||
|
||||
static const wxChar *dllnames[] =
|
||||
static const wxChar *const dllnames[] =
|
||||
{
|
||||
wxT("riched32"),
|
||||
wxT("riched20"),
|
||||
|
@@ -559,7 +559,7 @@ void wxPGDatePickerCtrlEditor::SetValueToUnspecified( wxPGProperty* property,
|
||||
// NB: Do not use wxS here since unlike wxT it doesn't translate to wxChar*
|
||||
//
|
||||
|
||||
static const wxChar* gs_fp_es_family_labels[] = {
|
||||
static const wxChar* const gs_fp_es_family_labels[] = {
|
||||
wxT("Default"), wxT("Decorative"),
|
||||
wxT("Roman"), wxT("Script"),
|
||||
wxT("Swiss"), wxT("Modern"),
|
||||
@@ -567,34 +567,34 @@ static const wxChar* gs_fp_es_family_labels[] = {
|
||||
(const wxChar*) NULL
|
||||
};
|
||||
|
||||
static long gs_fp_es_family_values[] = {
|
||||
static const long gs_fp_es_family_values[] = {
|
||||
wxFONTFAMILY_DEFAULT, wxFONTFAMILY_DECORATIVE,
|
||||
wxFONTFAMILY_ROMAN, wxFONTFAMILY_SCRIPT,
|
||||
wxFONTFAMILY_SWISS, wxFONTFAMILY_MODERN,
|
||||
wxFONTFAMILY_TELETYPE, wxFONTFAMILY_UNKNOWN
|
||||
};
|
||||
|
||||
static const wxChar* gs_fp_es_style_labels[] = {
|
||||
static const wxChar* const gs_fp_es_style_labels[] = {
|
||||
wxT("Normal"),
|
||||
wxT("Slant"),
|
||||
wxT("Italic"),
|
||||
(const wxChar*) NULL
|
||||
};
|
||||
|
||||
static long gs_fp_es_style_values[] = {
|
||||
static const long gs_fp_es_style_values[] = {
|
||||
wxNORMAL,
|
||||
wxSLANT,
|
||||
wxITALIC
|
||||
};
|
||||
|
||||
static const wxChar* gs_fp_es_weight_labels[] = {
|
||||
static const wxChar* const gs_fp_es_weight_labels[] = {
|
||||
wxT("Normal"),
|
||||
wxT("Light"),
|
||||
wxT("Bold"),
|
||||
(const wxChar*) NULL
|
||||
};
|
||||
|
||||
static long gs_fp_es_weight_values[] = {
|
||||
static const long gs_fp_es_weight_values[] = {
|
||||
wxNORMAL,
|
||||
wxLIGHT,
|
||||
wxBOLD
|
||||
@@ -831,7 +831,7 @@ void wxFontProperty::OnCustomPaint(wxDC& dc,
|
||||
#include "wx/colordlg.h"
|
||||
|
||||
//#define wx_cp_es_syscolours_len 25
|
||||
static const wxChar* gs_cp_es_syscolour_labels[] = {
|
||||
static const wxChar* const gs_cp_es_syscolour_labels[] = {
|
||||
wxT("AppWorkspace"),
|
||||
wxT("ActiveBorder"),
|
||||
wxT("ActiveCaption"),
|
||||
@@ -860,7 +860,7 @@ static const wxChar* gs_cp_es_syscolour_labels[] = {
|
||||
(const wxChar*) NULL
|
||||
};
|
||||
|
||||
static long gs_cp_es_syscolour_values[] = {
|
||||
static const long gs_cp_es_syscolour_values[] = {
|
||||
wxSYS_COLOUR_APPWORKSPACE,
|
||||
wxSYS_COLOUR_ACTIVEBORDER,
|
||||
wxSYS_COLOUR_ACTIVECAPTION,
|
||||
@@ -934,7 +934,7 @@ wxSystemColourProperty::wxSystemColourProperty( const wxString& label, const wxS
|
||||
|
||||
|
||||
wxSystemColourProperty::wxSystemColourProperty( const wxString& label, const wxString& name,
|
||||
const wxChar** labels, const long* values, wxPGChoices* choicesCache,
|
||||
const wxChar* const* labels, const long* values, wxPGChoices* choicesCache,
|
||||
const wxColourPropertyValue& value )
|
||||
: wxEnumProperty( label, name, labels, values, choicesCache )
|
||||
{
|
||||
@@ -946,7 +946,7 @@ wxSystemColourProperty::wxSystemColourProperty( const wxString& label, const wxS
|
||||
|
||||
|
||||
wxSystemColourProperty::wxSystemColourProperty( const wxString& label, const wxString& name,
|
||||
const wxChar** labels, const long* values, wxPGChoices* choicesCache,
|
||||
const wxChar* const* labels, const long* values, wxPGChoices* choicesCache,
|
||||
const wxColour& value )
|
||||
: wxEnumProperty( label, name, labels, values, choicesCache )
|
||||
{
|
||||
@@ -1492,7 +1492,7 @@ bool wxSystemColourProperty::DoSetAttribute( const wxString& name, wxVariant& va
|
||||
// wxColourProperty
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
static const wxChar* gs_cp_es_normcolour_labels[] = {
|
||||
static const wxChar* const gs_cp_es_normcolour_labels[] = {
|
||||
wxT("Black"),
|
||||
wxT("Maroon"),
|
||||
wxT("Navy"),
|
||||
@@ -1515,7 +1515,7 @@ static const wxChar* gs_cp_es_normcolour_labels[] = {
|
||||
(const wxChar*) NULL
|
||||
};
|
||||
|
||||
static unsigned long gs_cp_es_normcolour_colours[] = {
|
||||
static const unsigned long gs_cp_es_normcolour_colours[] = {
|
||||
wxPG_COLOUR(0,0,0),
|
||||
wxPG_COLOUR(128,0,0),
|
||||
wxPG_COLOUR(0,0,128),
|
||||
@@ -1604,7 +1604,7 @@ wxVariant wxColourProperty::DoTranslateVal( wxColourPropertyValue& v ) const
|
||||
#define NUM_CURSORS 28
|
||||
|
||||
//#define wx_cp_es_syscursors_len 28
|
||||
static const wxChar* gs_cp_es_syscursors_labels[NUM_CURSORS+1] = {
|
||||
static const wxChar* const gs_cp_es_syscursors_labels[NUM_CURSORS+1] = {
|
||||
wxT("Default"),
|
||||
wxT("Arrow"),
|
||||
wxT("Right Arrow"),
|
||||
@@ -1636,7 +1636,7 @@ static const wxChar* gs_cp_es_syscursors_labels[NUM_CURSORS+1] = {
|
||||
(const wxChar*) NULL
|
||||
};
|
||||
|
||||
static long gs_cp_es_syscursors_values[NUM_CURSORS] = {
|
||||
static const long gs_cp_es_syscursors_values[NUM_CURSORS] = {
|
||||
wxCURSOR_NONE,
|
||||
wxCURSOR_ARROW,
|
||||
wxCURSOR_RIGHT_ARROW,
|
||||
|
@@ -76,7 +76,7 @@ const char wxPropertyGridManagerNameStr[] = "wxPropertyGridManager";
|
||||
|
||||
|
||||
// Categoric Mode Icon
|
||||
static const char* gs_xpm_catmode[] = {
|
||||
static const char* const gs_xpm_catmode[] = {
|
||||
"16 16 5 1",
|
||||
". c none",
|
||||
"B c black",
|
||||
@@ -102,7 +102,7 @@ static const char* gs_xpm_catmode[] = {
|
||||
};
|
||||
|
||||
// Alphabetic Mode Icon
|
||||
static const char* gs_xpm_noncatmode[] = {
|
||||
static const char* const gs_xpm_noncatmode[] = {
|
||||
"16 16 5 1",
|
||||
". c none",
|
||||
"B c black",
|
||||
@@ -128,7 +128,7 @@ static const char* gs_xpm_noncatmode[] = {
|
||||
};
|
||||
|
||||
// Default Page Icon.
|
||||
static const char* gs_xpm_defpage[] = {
|
||||
static const char* const gs_xpm_defpage[] = {
|
||||
"16 16 5 1",
|
||||
". c none",
|
||||
"B c black",
|
||||
@@ -840,7 +840,7 @@ wxPropertyGridPage* wxPropertyGridManager::InsertPage( int index,
|
||||
m_pToolbar->AddTool(m_nextTbInd,label,bmp,label,wxITEM_RADIO);
|
||||
//m_pToolbar->InsertTool(index+3,m_nextTbInd,bmp);
|
||||
else
|
||||
m_pToolbar->AddTool(m_nextTbInd,label,wxBitmap( (const char**)gs_xpm_defpage ),
|
||||
m_pToolbar->AddTool(m_nextTbInd,label,wxBitmap(gs_xpm_defpage),
|
||||
label,wxITEM_RADIO);
|
||||
|
||||
m_nextTbInd++;
|
||||
@@ -1274,10 +1274,10 @@ void wxPropertyGridManager::RecreateControls()
|
||||
wxString desc1(_("Categorized Mode"));
|
||||
wxString desc2(_("Alphabetic Mode"));
|
||||
m_pToolbar->AddTool(baseId+ID_ADVTBITEMSBASE_OFFSET+0,
|
||||
desc1,wxBitmap ( (const char**)gs_xpm_catmode ),
|
||||
desc1,wxBitmap (gs_xpm_catmode),
|
||||
desc1,wxITEM_RADIO);
|
||||
m_pToolbar->AddTool(baseId+ID_ADVTBITEMSBASE_OFFSET+1,
|
||||
desc2,wxBitmap ( (const char**)gs_xpm_noncatmode ),
|
||||
desc2,wxBitmap (gs_xpm_noncatmode),
|
||||
desc2,wxITEM_RADIO);
|
||||
m_pToolbar->Realize();
|
||||
}
|
||||
|
@@ -1707,7 +1707,7 @@ wxVariant wxPGProperty::GetAttributesAsList() const
|
||||
// Slots of utility flags are NULL
|
||||
const unsigned int gs_propFlagToStringSize = 14;
|
||||
|
||||
static const wxChar* gs_propFlagToString[gs_propFlagToStringSize] = {
|
||||
static const wxChar* const gs_propFlagToString[gs_propFlagToStringSize] = {
|
||||
NULL,
|
||||
wxT("DISABLED"),
|
||||
wxT("HIDDEN"),
|
||||
@@ -2684,12 +2684,12 @@ wxPGChoiceEntry& wxPGChoices::AddAsSorted( const wxString& label, int value )
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void wxPGChoices::Add( const wxChar** labels, const ValArrItem* values )
|
||||
void wxPGChoices::Add( const wxChar* const* labels, const ValArrItem* values )
|
||||
{
|
||||
AllocExclusive();
|
||||
|
||||
unsigned int itemcount = 0;
|
||||
const wxChar** p = &labels[0];
|
||||
const wxChar* const* p = &labels[0];
|
||||
while ( *p ) { p++; itemcount++; }
|
||||
|
||||
unsigned int i;
|
||||
|
@@ -352,13 +352,13 @@ wxValidator* wxIntProperty::DoGetValidator() const
|
||||
|
||||
#define wxPG_UINT_TEMPLATE_MAX 8
|
||||
|
||||
static const wxChar* gs_uintTemplates32[wxPG_UINT_TEMPLATE_MAX] = {
|
||||
static const wxChar* const gs_uintTemplates32[wxPG_UINT_TEMPLATE_MAX] = {
|
||||
wxT("%x"),wxT("0x%x"),wxT("$%x"),
|
||||
wxT("%X"),wxT("0x%X"),wxT("$%X"),
|
||||
wxT("%u"),wxT("%o")
|
||||
};
|
||||
|
||||
static const char* gs_uintTemplates64[wxPG_UINT_TEMPLATE_MAX] = {
|
||||
static const char* const gs_uintTemplates64[wxPG_UINT_TEMPLATE_MAX] = {
|
||||
"%" wxLongLongFmtSpec "x",
|
||||
"0x%" wxLongLongFmtSpec "x",
|
||||
"$%" wxLongLongFmtSpec "x",
|
||||
@@ -874,7 +874,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxEnumProperty, wxPGProperty)
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(wxEnumProperty,long,Choice)
|
||||
|
||||
wxEnumProperty::wxEnumProperty( const wxString& label, const wxString& name, const wxChar** labels,
|
||||
wxEnumProperty::wxEnumProperty( const wxString& label, const wxString& name, const wxChar* const* labels,
|
||||
const long* values, int value ) : wxPGProperty(label,name)
|
||||
{
|
||||
SetIndex(0);
|
||||
@@ -888,7 +888,7 @@ wxEnumProperty::wxEnumProperty( const wxString& label, const wxString& name, con
|
||||
}
|
||||
}
|
||||
|
||||
wxEnumProperty::wxEnumProperty( const wxString& label, const wxString& name, const wxChar** labels,
|
||||
wxEnumProperty::wxEnumProperty( const wxString& label, const wxString& name, const wxChar* const* labels,
|
||||
const long* values, wxPGChoices* choicesCache, int value )
|
||||
: wxPGProperty(label,name)
|
||||
{
|
||||
@@ -1138,14 +1138,14 @@ IMPLEMENT_DYNAMIC_CLASS(wxEditEnumProperty, wxPGProperty)
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(wxEditEnumProperty,wxString,ComboBox)
|
||||
|
||||
wxEditEnumProperty::wxEditEnumProperty( const wxString& label, const wxString& name, const wxChar** labels,
|
||||
wxEditEnumProperty::wxEditEnumProperty( const wxString& label, const wxString& name, const wxChar* const* labels,
|
||||
const long* values, const wxString& value )
|
||||
: wxEnumProperty(label,name,labels,values,0)
|
||||
{
|
||||
SetValue( value );
|
||||
}
|
||||
|
||||
wxEditEnumProperty::wxEditEnumProperty( const wxString& label, const wxString& name, const wxChar** labels,
|
||||
wxEditEnumProperty::wxEditEnumProperty( const wxString& label, const wxString& name, const wxChar* const* labels,
|
||||
const long* values, wxPGChoices* choicesCache, const wxString& value )
|
||||
: wxEnumProperty(label,name,labels,values,choicesCache,0)
|
||||
{
|
||||
@@ -1264,7 +1264,7 @@ void wxFlagsProperty::Init()
|
||||
}
|
||||
|
||||
wxFlagsProperty::wxFlagsProperty( const wxString& label, const wxString& name,
|
||||
const wxChar** labels, const long* values, long value ) : wxPGProperty(label,name)
|
||||
const wxChar* const* labels, const long* values, long value ) : wxPGProperty(label,name)
|
||||
{
|
||||
m_oldChoicesData = NULL;
|
||||
|
||||
|
@@ -645,7 +645,7 @@ wxDialUpManagerImpl::CheckIfconfig()
|
||||
// first time check for ifconfig location
|
||||
if ( m_CanUseIfconfig == -1 ) // unknown
|
||||
{
|
||||
static const wxChar *ifconfigLocations[] =
|
||||
static const wxChar *const ifconfigLocations[] =
|
||||
{
|
||||
wxT("/sbin"), // Linux, FreeBSD, Darwin
|
||||
wxT("/usr/sbin"), // SunOS, Solaris, AIX, HP-UX
|
||||
|
@@ -116,7 +116,7 @@ static void *wx_darwin_dlopen(const char *path, int WXUNUSED(mode) /* mode is ig
|
||||
{
|
||||
handle = NULL;
|
||||
|
||||
static const char *errorStrings[] =
|
||||
static const char *const errorStrings[] =
|
||||
{
|
||||
"%d: Object Image Load Failure",
|
||||
"%d: Object Image Load Success",
|
||||
|
@@ -725,7 +725,7 @@ public:
|
||||
void SetState(wxThreadState state)
|
||||
{
|
||||
#if wxUSE_LOG_TRACE
|
||||
static const wxChar *stateNames[] =
|
||||
static const wxChar *const stateNames[] =
|
||||
{
|
||||
wxT("NEW"),
|
||||
wxT("RUNNING"),
|
||||
|
Reference in New Issue
Block a user