some "const"s added

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1998-07-17 12:44:13 +00:00
parent e14dccff1c
commit 85ccdcce1c
4 changed files with 15 additions and 15 deletions

View File

@@ -284,7 +284,7 @@ class WXDLLEXPORT wxPrintPaperDatabase: public wxList
void ClearDatabase(void); void ClearDatabase(void);
void AddPaperType(char *name, int wmm, int hmm, int wp, int hp); void AddPaperType(char *name, int wmm, int hmm, int wp, int hp);
wxPrintPaperType *FindPaperType(char *name); wxPrintPaperType *FindPaperType(const char *name);
}; };
WXDLLEXPORT_DATA(extern wxPrintPaperDatabase*) wxThePrintPaperDatabase; WXDLLEXPORT_DATA(extern wxPrintPaperDatabase*) wxThePrintPaperDatabase;

View File

@@ -94,7 +94,7 @@ class WXDLLEXPORT wxPrintout: public wxObject
bool isPreview; bool isPreview;
public: public:
wxPrintout(char *title = "Printout"); wxPrintout(const char *title = "Printout");
~wxPrintout(void); ~wxPrintout(void);
virtual bool OnBeginDocument(int startPage, int endPage); virtual bool OnBeginDocument(int startPage, int endPage);

View File

@@ -690,8 +690,8 @@ void wxPostScriptDC::SetFont (const wxFont& the_font)
return; return;
char buf[100]; char buf[100];
char *name; const char *name;
char *style = ""; const char *style = "";
int Style = m_font.GetStyle (); int Style = m_font.GetStyle ();
int Weight = m_font.GetWeight (); int Weight = m_font.GetWeight ();
@@ -790,12 +790,12 @@ void wxPostScriptDC::SetPen (const wxPen& pen)
will be first black line *2* units long, then space 4 units, then the will be first black line *2* units long, then space 4 units, then the
pattern of *3* units black, 4 units space will be repeated. pattern of *3* units black, 4 units space will be repeated.
*/ */
static char *dotted = "[2 5] 2"; static const char *dotted = "[2 5] 2";
static char *short_dashed = "[4 4] 2"; static const char *short_dashed = "[4 4] 2";
static char *long_dashed = "[4 8] 2"; static const char *long_dashed = "[4 8] 2";
static char *dotted_dashed = "[6 6 2 6] 4"; static const char *dotted_dashed = "[6 6 2 6] 4";
char *psdash = NULL; const char *psdash = NULL;
switch (m_pen.GetStyle ()) switch (m_pen.GetStyle ())
{ {
case wxDOT: case wxDOT:
@@ -1640,7 +1640,7 @@ void wxPostScriptDC::GetTextExtent (const wxString& string, long *x, long *y,
// 1. construct filename ****************************************** // 1. construct filename ******************************************
/* MATTHEW: [2] Use wxTheFontNameDirectory */ /* MATTHEW: [2] Use wxTheFontNameDirectory */
char *name; const char *name;
// Julian - we'll need to do this a different way now we've removed the // Julian - we'll need to do this a different way now we've removed the
// font directory system. Must find Stefan's original code. // font directory system. Must find Stefan's original code.
@@ -1983,7 +1983,7 @@ long wxPostScriptDC::LogicalToDeviceYRel (long y) const
void wxPostScriptDC::GetSize(int* width, int* height) const void wxPostScriptDC::GetSize(int* width, int* height) const
{ {
char *paperType = wxThePrintSetupData->GetPaperName(); const char *paperType = wxThePrintSetupData->GetPaperName();
if (!paperType) if (!paperType)
paperType = "A4 210 x 297 mm"; paperType = "A4 210 x 297 mm";
@@ -2004,7 +2004,7 @@ void wxPostScriptDC::GetSize(int* width, int* height) const
void wxPostScriptDC::GetSizeMM(long *width, long *height) const void wxPostScriptDC::GetSizeMM(long *width, long *height) const
{ {
char *paperType = wxThePrintSetupData->GetPaperName(); const char *paperType = wxThePrintSetupData->GetPaperName();
if (!paperType) if (!paperType)
paperType = "A4 210 x 297 mm"; paperType = "A4 210 x 297 mm";
@@ -2565,7 +2565,7 @@ void wxPrintPaperDatabase::AddPaperType(char *name, int wmm, int hmm, int wp, in
Append(name, new wxPrintPaperType(name, wmm, hmm, wp, hp)); Append(name, new wxPrintPaperType(name, wmm, hmm, wp, hp));
} }
wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(char *name) wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const char *name)
{ {
wxNode *node = Find(name); wxNode *node = Find(name);
if (node) if (node)

View File

@@ -148,9 +148,9 @@ void wxPrinterBase::ReportError(wxWindow *parent, wxPrintout *WXUNUSED(printout)
* Printout class * Printout class
*/ */
wxPrintout::wxPrintout(char *title) wxPrintout::wxPrintout(const char *title)
{ {
printoutTitle = title ? copystring(title) : (char*)NULL; printoutTitle = title ? copystring(title) : NULL;
printoutDC = NULL; printoutDC = NULL;
pageWidthMM = 0; pageWidthMM = 0;
pageHeightMM = 0; pageHeightMM = 0;