From: Vadim Zeitlin Date: Tue, 12 Feb 2008 22:53:30 +0000 (+0000) Subject: use const char*, not char*, for string literals to avoid gcc warnings X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/522a028a174e59d7ac26bd07ae30fd25d6287280 use const char*, not char*, for string literals to avoid gcc warnings git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/stc/edit.cpp b/samples/stc/edit.cpp index a7674a4102..30f64ebb27 100644 --- a/samples/stc/edit.cpp +++ b/samples/stc/edit.cpp @@ -709,7 +709,7 @@ EditProperties::EditProperties (Edit *edit, // EditPrint //---------------------------------------------------------------------------- -EditPrint::EditPrint (Edit *edit, wxChar *title) +EditPrint::EditPrint (Edit *edit, const wxChar *title) : wxPrintout(title) { m_edit = edit; m_printed = 0; diff --git a/samples/stc/edit.h b/samples/stc/edit.h index c007173271..b96c9f5790 100644 --- a/samples/stc/edit.h +++ b/samples/stc/edit.h @@ -152,7 +152,7 @@ class EditPrint: public wxPrintout { public: //! constructor - EditPrint (Edit *edit, wxChar *title = _T("")); + EditPrint (Edit *edit, const wxChar *title = _T("")); //! event handlers bool OnPrintPage (int page); diff --git a/samples/stc/prefs.cpp b/samples/stc/prefs.cpp index ed5beb4011..b2275b1231 100644 --- a/samples/stc/prefs.cpp +++ b/samples/stc/prefs.cpp @@ -59,7 +59,7 @@ const CommonInfo g_CommonPrefs = { //---------------------------------------------------------------------------- // keywordlists // C++ -char* CppWordlist1 = +const char* CppWordlist1 = "asm auto bool break case catch char class const const_cast " "continue default delete do double dynamic_cast else enum explicit " "export extern false float for friend goto if inline int long " @@ -68,9 +68,9 @@ char* CppWordlist1 = "struct switch template this throw true try typedef typeid " "typename union unsigned using virtual void volatile wchar_t " "while"; -char* CppWordlist2 = +const char* CppWordlist2 = "file"; -char* CppWordlist3 = +const char* CppWordlist3 = "a addindex addtogroup anchor arg attention author b brief bug c " "class code date def defgroup deprecated dontinclude e em endcode " "endhtmlonly endif endlatexonly endlink endverbatim enum example " @@ -83,11 +83,11 @@ char* CppWordlist3 = "verbinclude version warning weakgroup $ @ \"\" & < > # { }"; // Python -char* PythonWordlist1 = +const char* PythonWordlist1 = "and assert break class continue def del elif else except exec " "finally for from global if import in is lambda None not or pass " "print raise return try while yield"; -char* PythonWordlist2 = +const char* PythonWordlist2 = "ACCELERATORS ALT AUTO3STATE AUTOCHECKBOX AUTORADIOBUTTON BEGIN " "BITMAP BLOCK BUTTON CAPTION CHARACTERISTICS CHECKBOX CLASS " "COMBOBOX CONTROL CTEXT CURSOR DEFPUSHBUTTON DIALOG DIALOGEX " diff --git a/samples/stc/prefs.h b/samples/stc/prefs.h index 0cbbee1535..90513dde3f 100644 --- a/samples/stc/prefs.h +++ b/samples/stc/prefs.h @@ -137,10 +137,10 @@ extern const int g_LanguagePrefsSize; //---------------------------------------------------------------------------- // StyleInfo struct StyleInfo { - wxChar *name; - wxChar *foreground; - wxChar *background; - wxChar *fontname; + const wxChar *name; + const wxChar *foreground; + const wxChar *background; + const wxChar *fontname; int fontsize; int fontstyle; int lettercase;