Use ctor-initializer rather than assignment for non-POD class members

This commit is contained in:
Paul Cornett
2019-02-25 10:23:35 -08:00
parent 8df0cfba2a
commit 7c3ce912e0
59 changed files with 150 additions and 177 deletions

View File

@@ -803,9 +803,9 @@ wxString wxHtmlHelpData::FindPageById(int id)
wxHtmlSearchStatus::wxHtmlSearchStatus(wxHtmlHelpData* data, const wxString& keyword,
bool case_sensitive, bool whole_words_only,
const wxString& book)
: m_Keyword(keyword)
{
m_Data = data;
m_Keyword = keyword;
wxHtmlBookRecord* bookr = NULL;
if (!book.empty())
{

View File

@@ -59,9 +59,9 @@ public:
wxHtmlWinAutoScrollTimer(wxScrolledWindow *win,
wxEventType eventTypeToSend,
int pos, int orient)
: m_eventType(eventTypeToSend)
{
m_win = win;
m_eventType = eventTypeToSend;
m_pos = pos;
m_orient = orient;
}
@@ -128,7 +128,7 @@ void wxHtmlWinAutoScrollTimer::Notify()
class WXDLLIMPEXP_HTML wxHtmlHistoryItem
{
public:
wxHtmlHistoryItem(const wxString& p, const wxString& a) {m_Page = p, m_Anchor = a, m_Pos = 0;}
wxHtmlHistoryItem(const wxString& p, const wxString& a) : m_Page(p), m_Anchor(a), m_Pos(0) { }
int GetPos() const {return m_Pos;}
void SetPos(int p) {m_Pos = p;}
const wxString& GetPage() const {return m_Page;}

View File

@@ -253,8 +253,8 @@ class wxHtmlImageMapCell : public wxHtmlCell
wxHtmlImageMapCell::wxHtmlImageMapCell( wxString &name )
: m_Name(name)
{
m_Name = name ;
}
wxHtmlLinkInfo *wxHtmlImageMapCell::GetLink( int x, int y ) const
@@ -359,6 +359,7 @@ wxHtmlImageCell::wxHtmlImageCell(wxHtmlWindowInterface *windowIface,
wxFSFile *input, double scaleHDPI,
int w, bool wpercent, int h, bool hpresent, double scale, int align,
const wxString& mapname) : wxHtmlCell()
, m_mapName(mapname)
{
m_windowIface = windowIface;
m_scale = scale;
@@ -370,7 +371,6 @@ wxHtmlImageCell::wxHtmlImageCell(wxHtmlWindowInterface *windowIface,
m_bmpWpercent = wpercent;
m_bmpHpresent = hpresent;
m_imageMap = NULL;
m_mapName = mapname;
SetCanLiveOnPagebreak(false);
#if wxUSE_GIF && wxUSE_TIMER
m_gifDecoder = NULL;

View File

@@ -32,7 +32,7 @@ private:
public:
wxHtmlAnchorCell(const wxString& name) : wxHtmlCell()
{ m_AnchorName = name; }
, m_AnchorName(name) { }
void Draw(wxDC& WXUNUSED(dc),
int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(view_y1), int WXUNUSED(view_y2),