added missing consts and pass objects by const reference instead of by value (patch 1205869)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-09-24 21:43:15 +00:00
parent 68bc51a9ed
commit fbfb8bcc3f
111 changed files with 199 additions and 197 deletions

View File

@@ -199,7 +199,7 @@ private:
class DnDFrame : public wxFrame
{
public:
DnDFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h);
DnDFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h);
virtual ~DnDFrame();
void OnPaint(wxPaintEvent& event);
@@ -920,7 +920,7 @@ bool DnDApp::OnInit()
#if wxUSE_DRAG_AND_DROP || wxUSE_CLIPBOARD
DnDFrame::DnDFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h)
DnDFrame::DnDFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h)
: wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h)),
m_strText(_T("wxWidgets drag & drop works :-)"))

View File

@@ -119,7 +119,7 @@ wxInputStream& DrawingDocument::LoadObject(wxInputStream& stream)
}
#endif
DoodleSegment::DoodleSegment(DoodleSegment& seg):wxObject()
DoodleSegment::DoodleSegment(const DoodleSegment& seg):wxObject()
{
wxList::compatibility_iterator node = seg.lines.GetFirst();
while (node)

View File

@@ -32,7 +32,7 @@ public:
wxList lines;
DoodleSegment(void){};
DoodleSegment(DoodleSegment& seg);
DoodleSegment(const DoodleSegment& seg);
~DoodleSegment(void);
void Draw(wxDC *dc);

View File

@@ -117,7 +117,7 @@ wxInputStream& DrawingDocument::LoadObject(wxInputStream& stream)
}
#endif
DoodleSegment::DoodleSegment(DoodleSegment& seg)
DoodleSegment::DoodleSegment(const DoodleSegment& seg)
:wxObject()
{
wxList::compatibility_iterator node = seg.lines.GetFirst();

View File

@@ -32,7 +32,7 @@ class DoodleSegment: public wxObject
wxList lines;
DoodleSegment(void){};
DoodleSegment(DoodleSegment& seg);
DoodleSegment(const DoodleSegment& seg);
~DoodleSegment(void);
void Draw(wxDC *dc);

View File

@@ -417,7 +417,7 @@ MySizerDialog::MySizerDialog(wxWindow *parent, const wxChar *title)
#define POS(r, c) wxGBPosition(r,c)
#define SPAN(r, c) wxGBSpan(r,c)
wxChar* gbsDescription =_T("\
const wxChar gbsDescription[] =_T("\
The wxGridBagSizer is similar to the wxFlexGridSizer except the items are explicitly positioned\n\
in a virtual cell of the layout grid, and column or row spanning is allowed. For example, this\n\
static text is positioned at (0,0) and it spans 7 columns.");

View File

@@ -40,7 +40,7 @@ class OwnerDrawnFrame : public wxFrame
{
public:
// ctor & dtor
OwnerDrawnFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h);
OwnerDrawnFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h);
~OwnerDrawnFrame(){};
// notifications
@@ -202,7 +202,7 @@ void OwnerDrawnFrame::InitMenu()
}
// main frame constructor
OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, wxChar *title,
OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, const wxChar *title,
int x, int y, int w, int h)
: wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h))
{

View File

@@ -66,7 +66,7 @@ wxPageSetupData* g_pageSetupData = (wxPageSetupData*) NULL;
IMPLEMENT_APP(MyApp)
// Writes a header on a page. Margin units are in millimetres.
bool WritePageHeader(wxPrintout *printout, wxDC *dc, wxChar *text, float mmToLogical);
bool WritePageHeader(wxPrintout *printout, wxDC *dc, const wxChar *text, float mmToLogical);
// The `main program' equivalent, creating the windows and returning the
// main frame
@@ -578,7 +578,7 @@ void MyPrintout::DrawPageTwo(wxDC *dc)
}
// Writes a header on a page. Margin units are in millimetres.
bool WritePageHeader(wxPrintout *printout, wxDC *dc, wxChar *text, float mmToLogical)
bool WritePageHeader(wxPrintout *printout, wxDC *dc, const wxChar *text, float mmToLogical)
{
/*
static wxFont *headerFont = (wxFont *) NULL;

View File

@@ -68,7 +68,7 @@ DECLARE_EVENT_TABLE()
class MyPrintout: public wxPrintout
{
public:
MyPrintout(wxChar *title = _T("My printout")):wxPrintout(title) {}
MyPrintout(const wxChar *title = _T("My printout")):wxPrintout(title) {}
bool OnPrintPage(int page);
bool HasPage(int page);
bool OnBeginDocument(int startPage, int endPage);

View File

@@ -181,7 +181,7 @@ class RegFrame : public wxFrame
{
public:
// ctor & dtor
RegFrame(wxFrame *parent, wxChar *title, int x, int y, int w, int h);
RegFrame(wxFrame *parent, const wxChar *title, int x, int y, int w, int h);
virtual ~RegFrame();
// callbacks
@@ -331,7 +331,7 @@ bool RegApp::OnInit()
// RegFrame
// ----------------------------------------------------------------------------
RegFrame::RegFrame(wxFrame *parent, wxChar *title, int x, int y, int w, int h)
RegFrame::RegFrame(wxFrame *parent, const wxChar *title, int x, int y, int w, int h)
: wxFrame(parent, wxID_ANY, title, wxPoint(x, y), wxSize(w, h))
{
// this reduces flicker effects