use const char*, not char*, for string literals to avoid gcc warnings
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 12 Feb 2008 22:53:30 +0000 (22:53 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 12 Feb 2008 22:53:30 +0000 (22:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/stc/edit.cpp
samples/stc/edit.h
samples/stc/prefs.cpp
samples/stc/prefs.h

index a7674a4102378845ad8f0b83ba1c879aaf923219..30f64ebb2771f0a88e12e9e25848ed79e5346d90 100644 (file)
@@ -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;
index c007173271dfae1108c274e74a5ba5dab3ab3573..b96c9f5790dbe83944bca6b5906e30a4443a076f 100644 (file)
@@ -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);
index ed5beb4011cdba38bbe6cf4c7b6c0f84b8fc5bb0..b2275b123174291d251ab033a208d8f0bbd62e19 100644 (file)
@@ -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 "
index 0cbbee1535e3928a6faa2a4f320e64f65f3f71fe..90513dde3f901364f82bb8906f6130e2cbf34146 100644 (file)
@@ -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;