Use ctor-initializer rather than assignment for non-POD class members
This commit is contained in:
@@ -32,11 +32,11 @@ class WXDLLIMPEXP_HTML wxHtmlBookRecord
|
||||
public:
|
||||
wxHtmlBookRecord(const wxString& bookfile, const wxString& basepath,
|
||||
const wxString& title, const wxString& start)
|
||||
: m_BookFile(bookfile)
|
||||
, m_BasePath(basepath)
|
||||
, m_Title(title)
|
||||
, m_Start(start)
|
||||
{
|
||||
m_BookFile = bookfile;
|
||||
m_BasePath = basepath;
|
||||
m_Title = title;
|
||||
m_Start = start;
|
||||
// for debugging, give the contents index obvious default values
|
||||
m_ContentsStart = m_ContentsEnd = -1;
|
||||
}
|
||||
|
@@ -571,7 +571,7 @@ protected:
|
||||
class WXDLLIMPEXP_HTML wxHtmlColourCell : public wxHtmlCell
|
||||
{
|
||||
public:
|
||||
wxHtmlColourCell(const wxColour& clr, int flags = wxHTML_CLR_FOREGROUND) : wxHtmlCell() {m_Colour = clr; m_Flags = flags;}
|
||||
wxHtmlColourCell(const wxColour& clr, int flags = wxHTML_CLR_FOREGROUND) : wxHtmlCell(), m_Colour(clr) { m_Flags = flags;}
|
||||
virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
|
||||
wxHtmlRenderingInfo& info) wxOVERRIDE;
|
||||
virtual void DrawInvisible(wxDC& dc, int x, int y,
|
||||
@@ -596,7 +596,7 @@ protected:
|
||||
class WXDLLIMPEXP_HTML wxHtmlFontCell : public wxHtmlCell
|
||||
{
|
||||
public:
|
||||
wxHtmlFontCell(wxFont *font) : wxHtmlCell() { m_Font = (*font); }
|
||||
wxHtmlFontCell(wxFont *font) : wxHtmlCell(), m_Font(*font) { }
|
||||
virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
|
||||
wxHtmlRenderingInfo& info) wxOVERRIDE;
|
||||
virtual void DrawInvisible(wxDC& dc, int x, int y,
|
||||
|
@@ -578,10 +578,10 @@ public:
|
||||
wxHtmlCell *cell, const wxPoint &pt,
|
||||
const wxMouseEvent &ev)
|
||||
: wxCommandEvent(commandType, id)
|
||||
, m_mouseEvent(ev)
|
||||
, m_pt(pt)
|
||||
{
|
||||
m_cell = cell;
|
||||
m_pt = pt;
|
||||
m_mouseEvent = ev;
|
||||
m_bLinkWasClicked = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user