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

@@ -231,8 +231,8 @@ public:
{ {
public: public:
DataHolder(const T2& value) DataHolder(const T2& value)
: m_value(value)
{ {
m_value = value;
} }
virtual ~DataHolder() { } virtual ~DataHolder() { }

View File

@@ -69,10 +69,10 @@ public:
wxAuiToolBarEvent(wxEventType commandType = wxEVT_NULL, wxAuiToolBarEvent(wxEventType commandType = wxEVT_NULL,
int winId = 0) int winId = 0)
: wxNotifyEvent(commandType, winId) : wxNotifyEvent(commandType, winId)
, m_clickPt(-1, -1)
, m_rect(-1, -1, 0, 0)
{ {
m_isDropdownClicked = false; m_isDropdownClicked = false;
m_clickPt = wxPoint(-1, -1);
m_rect = wxRect(-1,-1, 0, 0);
m_toolId = -1; m_toolId = -1;
} }
wxEvent *Clone() const wxOVERRIDE { return new wxAuiToolBarEvent(*this); } wxEvent *Clone() const wxOVERRIDE { return new wxAuiToolBarEvent(*this); }

View File

@@ -148,6 +148,11 @@ class WXDLLIMPEXP_AUI wxAuiPaneInfo
public: public:
wxAuiPaneInfo() wxAuiPaneInfo()
: best_size(wxDefaultSize)
, min_size(wxDefaultSize)
, max_size(wxDefaultSize)
, floating_pos(wxDefaultPosition)
, floating_size(wxDefaultSize)
{ {
window = NULL; window = NULL;
frame = NULL; frame = NULL;
@@ -156,11 +161,6 @@ public:
dock_layer = 0; dock_layer = 0;
dock_row = 0; dock_row = 0;
dock_pos = 0; dock_pos = 0;
floating_pos = wxDefaultPosition;
floating_size = wxDefaultSize;
best_size = wxDefaultSize;
min_size = wxDefaultSize;
max_size = wxDefaultSize;
dock_proportion = 0; dock_proportion = 0;
DefaultPane(); DefaultPane();

View File

@@ -40,7 +40,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxColourPickerCtrlNameStr[];
class WXDLLIMPEXP_CORE wxColourPickerWidgetBase class WXDLLIMPEXP_CORE wxColourPickerWidgetBase
{ {
public: public:
wxColourPickerWidgetBase() { m_colour = *wxBLACK; } wxColourPickerWidgetBase() : m_colour(*wxBLACK) { }
virtual ~wxColourPickerWidgetBase() {} virtual ~wxColourPickerWidgetBase() {}
wxColour GetColour() const wxColour GetColour() const

View File

@@ -464,7 +464,7 @@ public:
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// default ctor does not initialize the object, use Set()! // default ctor does not initialize the object, use Set()!
wxDateTime() { m_time = wxINT64_MIN; } wxDateTime() : m_time(wxINT64_MIN) { }
// from time_t: seconds since the Epoch 00:00:00 UTC, Jan 1, 1970) // from time_t: seconds since the Epoch 00:00:00 UTC, Jan 1, 1970)
inline wxDateTime(time_t timet); inline wxDateTime(time_t timet);
@@ -1114,7 +1114,7 @@ public:
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// construct from internal representation // construct from internal representation
wxDateTime(const wxLongLong& time) { m_time = time; } wxDateTime(const wxLongLong& time) : m_time(time) { }
// get the internal representation // get the internal representation
inline wxLongLong GetValue() const; inline wxLongLong GetValue() const;
@@ -1343,7 +1343,7 @@ public:
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// construct from internal representation // construct from internal representation
wxTimeSpan(const wxLongLong& diff) { m_diff = diff; } wxTimeSpan(const wxLongLong& diff) : m_diff(diff) { }
// get the internal representation // get the internal representation
wxLongLong GetValue() const { return m_diff; } wxLongLong GetValue() const { return m_diff; }

View File

@@ -160,7 +160,7 @@ public:
// The class of wxEvent-derived class carried by the events of this type. // The class of wxEvent-derived class carried by the events of this type.
typedef T EventClass; typedef T EventClass;
wxEventTypeTag(wxEventType type) { m_type = type; } wxEventTypeTag(wxEventType type) : m_type(type) { }
// Return a wxEventType reference for the initialization of the static // Return a wxEventType reference for the initialization of the static
// event tables. See wxEventTableEntry::m_eventType for a more thorough // event tables. See wxEventTableEntry::m_eventType for a more thorough
@@ -1898,8 +1898,8 @@ public:
} }
wxGestureEvent(const wxGestureEvent& event) : wxEvent(event) wxGestureEvent(const wxGestureEvent& event) : wxEvent(event)
, m_pos(event.m_pos)
{ {
m_pos = event.m_pos;
m_isStart = event.m_isStart; m_isStart = event.m_isStart;
m_isEnd = event.m_isEnd; m_isEnd = event.m_isEnd;
} }

View File

@@ -38,14 +38,14 @@ public:
, wxDateTime modif , wxDateTime modif
#endif // wxUSE_DATETIME #endif // wxUSE_DATETIME
) )
: m_Location(loc)
, m_MimeType(mimetype.Lower())
, m_Anchor(anchor)
#if wxUSE_DATETIME
, m_Modif(modif)
#endif
{ {
m_Stream = stream; m_Stream = stream;
m_Location = loc;
m_MimeType = mimetype.Lower();
m_Anchor = anchor;
#if wxUSE_DATETIME
m_Modif = modif;
#endif // wxUSE_DATETIME
} }
virtual ~wxFSFile() { delete m_Stream; } virtual ~wxFSFile() { delete m_Stream; }

View File

@@ -43,8 +43,8 @@ class wxGtkCollatableString
{ {
public: public:
wxGtkCollatableString( const wxString &label, gchar *key ) wxGtkCollatableString( const wxString &label, gchar *key )
: m_label(label)
{ {
m_label = label;
m_key = key; m_key = key;
} }

View File

@@ -32,11 +32,11 @@ class WXDLLIMPEXP_HTML wxHtmlBookRecord
public: public:
wxHtmlBookRecord(const wxString& bookfile, const wxString& basepath, wxHtmlBookRecord(const wxString& bookfile, const wxString& basepath,
const wxString& title, const wxString& start) 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 // for debugging, give the contents index obvious default values
m_ContentsStart = m_ContentsEnd = -1; m_ContentsStart = m_ContentsEnd = -1;
} }

View File

@@ -571,7 +571,7 @@ protected:
class WXDLLIMPEXP_HTML wxHtmlColourCell : public wxHtmlCell class WXDLLIMPEXP_HTML wxHtmlColourCell : public wxHtmlCell
{ {
public: 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, virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
wxHtmlRenderingInfo& info) wxOVERRIDE; wxHtmlRenderingInfo& info) wxOVERRIDE;
virtual void DrawInvisible(wxDC& dc, int x, int y, virtual void DrawInvisible(wxDC& dc, int x, int y,
@@ -596,7 +596,7 @@ protected:
class WXDLLIMPEXP_HTML wxHtmlFontCell : public wxHtmlCell class WXDLLIMPEXP_HTML wxHtmlFontCell : public wxHtmlCell
{ {
public: 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, virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
wxHtmlRenderingInfo& info) wxOVERRIDE; wxHtmlRenderingInfo& info) wxOVERRIDE;
virtual void DrawInvisible(wxDC& dc, int x, int y, virtual void DrawInvisible(wxDC& dc, int x, int y,

View File

@@ -578,10 +578,10 @@ public:
wxHtmlCell *cell, const wxPoint &pt, wxHtmlCell *cell, const wxPoint &pt,
const wxMouseEvent &ev) const wxMouseEvent &ev)
: wxCommandEvent(commandType, id) : wxCommandEvent(commandType, id)
, m_mouseEvent(ev)
, m_pt(pt)
{ {
m_cell = cell; m_cell = cell;
m_pt = pt;
m_mouseEvent = ev;
m_bLinkWasClicked = false; m_bLinkWasClicked = false;
} }

View File

@@ -81,9 +81,9 @@ public:
wxColourPropertyValue( const wxColourPropertyValue& v ) wxColourPropertyValue( const wxColourPropertyValue& v )
: wxObject() : wxObject()
, m_colour(v.m_colour)
{ {
m_type = v.m_type; m_type = v.m_type;
m_colour = v.m_colour;
} }
void Init( wxUint32 type, const wxColour& colour ) void Init( wxUint32 type, const wxColour& colour )
@@ -94,9 +94,9 @@ public:
wxColourPropertyValue( const wxColour& colour ) wxColourPropertyValue( const wxColour& colour )
: wxObject() : wxObject()
, m_colour(colour)
{ {
m_type = wxPG_COLOUR_CUSTOM; m_type = wxPG_COLOUR_CUSTOM;
m_colour = colour;
} }
wxColourPropertyValue( wxUint32 type ) wxColourPropertyValue( wxUint32 type )

View File

@@ -338,8 +338,8 @@ class WXDLLIMPEXP_PROPGRID wxPGCommonValue
public: public:
wxPGCommonValue( const wxString& label, wxPGCellRenderer* renderer ) wxPGCommonValue( const wxString& label, wxPGCellRenderer* renderer )
: m_label(label)
{ {
m_label = label;
m_renderer = renderer; m_renderer = renderer;
renderer->IncRef(); renderer->IncRef();
} }

View File

@@ -485,7 +485,7 @@ class classname##VariantData: public wxVariantData \
{ \ { \
public:\ public:\
classname##VariantData() {} \ classname##VariantData() {} \
classname##VariantData( const classname &value ) { m_value = value; } \ classname##VariantData( const classname &value ) : m_value(value) { } \
\ \
classname &GetValue() { return m_value; } \ classname &GetValue() { return m_value; } \
\ \

View File

@@ -25,13 +25,13 @@ public:
int micro = 0, int micro = 0,
const wxString& description = wxString(), const wxString& description = wxString(),
const wxString& copyright = wxString()) const wxString& copyright = wxString())
: m_name(name)
, m_description(description)
, m_copyright(copyright)
{ {
m_name = name;
m_major = major; m_major = major;
m_minor = minor; m_minor = minor;
m_micro = micro; m_micro = micro;
m_description = description;
m_copyright = copyright;
} }
// Default copy ctor, assignment operator and dtor are ok. // Default copy ctor, assignment operator and dtor are ok.

View File

@@ -3463,8 +3463,8 @@ public:
}; };
wxAuiLayoutObject(const wxSize &size, const wxAuiPaneInfo &pInfo) wxAuiLayoutObject(const wxSize &size, const wxAuiPaneInfo &pInfo)
: m_size(size)
{ {
m_size = size;
m_pInfo = &pInfo; m_pInfo = &pInfo;
/* /*
To speed up the sorting of the panes, the direction is mapped to a To speed up the sorting of the panes, the direction is mapped to a

View File

@@ -52,8 +52,8 @@ wxAuiFloatingFrame::wxAuiFloatingFrame(wxWindow* parent,
(pane.HasMaximizeButton()?wxMAXIMIZE_BOX:0) | (pane.HasMaximizeButton()?wxMAXIMIZE_BOX:0) |
(pane.IsFixed()?0:wxRESIZE_BORDER) (pane.IsFixed()?0:wxRESIZE_BORDER)
) )
, m_ownerMgr(owner_mgr)
{ {
m_ownerMgr = owner_mgr;
m_moving = false; m_moving = false;
m_mgr.SetManagedWindow(this); m_mgr.SetManagedWindow(this);
m_solidDrag = true; m_solidDrag = true;

View File

@@ -155,30 +155,25 @@ static const unsigned char list_bits[] = {
// -- wxAuiGenericTabArt class implementation -- // -- wxAuiGenericTabArt class implementation --
wxAuiGenericTabArt::wxAuiGenericTabArt() wxAuiGenericTabArt::wxAuiGenericTabArt()
: m_normalFont(*wxNORMAL_FONT)
, m_selectedFont(m_normalFont)
, m_activeCloseBmp(wxAuiBitmapFromBits(close_bits, 16, 16, *wxBLACK))
, m_disabledCloseBmp(wxAuiBitmapFromBits(close_bits, 16, 16, wxColour(128,128,128)))
, m_activeLeftBmp(wxAuiBitmapFromBits(left_bits, 16, 16, *wxBLACK))
, m_disabledLeftBmp(wxAuiBitmapFromBits(left_bits, 16, 16, wxColour(128,128,128)))
, m_activeRightBmp(wxAuiBitmapFromBits(right_bits, 16, 16, *wxBLACK))
, m_disabledRightBmp(wxAuiBitmapFromBits(right_bits, 16, 16, wxColour(128,128,128)))
, m_activeWindowListBmp(wxAuiBitmapFromBits(list_bits, 16, 16, *wxBLACK))
, m_disabledWindowListBmp(wxAuiBitmapFromBits(list_bits, 16, 16, wxColour(128,128,128)))
{ {
m_normalFont = *wxNORMAL_FONT;
m_selectedFont = *wxNORMAL_FONT;
m_selectedFont.SetWeight(wxFONTWEIGHT_BOLD); m_selectedFont.SetWeight(wxFONTWEIGHT_BOLD);
m_measuringFont = m_selectedFont; m_measuringFont = m_selectedFont;
m_fixedTabWidth = wxWindow::FromDIP(100, NULL); m_fixedTabWidth = wxWindow::FromDIP(100, NULL);
m_tabCtrlHeight = 0; m_tabCtrlHeight = 0;
m_flags = 0;
UpdateColoursFromSystem(); UpdateColoursFromSystem();
m_activeCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, *wxBLACK);
m_disabledCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, wxColour(128,128,128));
m_activeLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, *wxBLACK);
m_disabledLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, wxColour(128,128,128));
m_activeRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, *wxBLACK);
m_disabledRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, wxColour(128,128,128));
m_activeWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, *wxBLACK);
m_disabledWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, wxColour(128,128,128));
m_flags = 0;
} }
wxAuiGenericTabArt::~wxAuiGenericTabArt() wxAuiGenericTabArt::~wxAuiGenericTabArt()
@@ -892,9 +887,17 @@ void wxAuiGenericTabArt::SetActiveColour(const wxColour& colour)
// -- wxAuiSimpleTabArt class implementation -- // -- wxAuiSimpleTabArt class implementation --
wxAuiSimpleTabArt::wxAuiSimpleTabArt() wxAuiSimpleTabArt::wxAuiSimpleTabArt()
: m_normalFont(*wxNORMAL_FONT)
, m_selectedFont(m_normalFont)
, m_activeCloseBmp(wxAuiBitmapFromBits(close_bits, 16, 16, *wxBLACK))
, m_disabledCloseBmp(wxAuiBitmapFromBits(close_bits, 16, 16, wxColour(128,128,128)))
, m_activeLeftBmp(wxAuiBitmapFromBits(left_bits, 16, 16, *wxBLACK))
, m_disabledLeftBmp(wxAuiBitmapFromBits(left_bits, 16, 16, wxColour(128,128,128)))
, m_activeRightBmp(wxAuiBitmapFromBits(right_bits, 16, 16, *wxBLACK))
, m_disabledRightBmp(wxAuiBitmapFromBits(right_bits, 16, 16, wxColour(128,128,128)))
, m_activeWindowListBmp(wxAuiBitmapFromBits(list_bits, 16, 16, *wxBLACK))
, m_disabledWindowListBmp(wxAuiBitmapFromBits(list_bits, 16, 16, wxColour(128,128,128)))
{ {
m_normalFont = *wxNORMAL_FONT;
m_selectedFont = *wxNORMAL_FONT;
m_selectedFont.SetWeight(wxFONTWEIGHT_BOLD); m_selectedFont.SetWeight(wxFONTWEIGHT_BOLD);
m_measuringFont = m_selectedFont; m_measuringFont = m_selectedFont;
@@ -913,17 +916,6 @@ wxAuiSimpleTabArt::wxAuiSimpleTabArt()
m_selectedBkBrush = wxBrush(selectedtabColour); m_selectedBkBrush = wxBrush(selectedtabColour);
m_selectedBkPen = wxPen(selectedtabColour); m_selectedBkPen = wxPen(selectedtabColour);
m_activeCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, *wxBLACK);
m_disabledCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, wxColour(128,128,128));
m_activeLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, *wxBLACK);
m_disabledLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, wxColour(128,128,128));
m_activeRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, *wxBLACK);
m_disabledRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, wxColour(128,128,128));
m_activeWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, *wxBLACK);
m_disabledWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, wxColour(128,128,128));
} }
wxAuiSimpleTabArt::~wxAuiSimpleTabArt() wxAuiSimpleTabArt::~wxAuiSimpleTabArt()

View File

@@ -156,9 +156,8 @@ struct wxCmdLineOption: public wxCmdLineArgImpl
wxCmdLineParamType typ, wxCmdLineParamType typ,
int fl) int fl)
: wxCmdLineArgImpl(k, shrt, lng, typ) : wxCmdLineArgImpl(k, shrt, lng, typ)
, description(desc)
{ {
description = desc;
flags = fl; flags = fl;
} }
@@ -395,13 +394,13 @@ wxCmdLineArgs::const_iterator wxCmdLineArgs::const_iterator::operator -- (int)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
wxCmdLineParserData::wxCmdLineParserData() wxCmdLineParserData::wxCmdLineParserData()
#ifdef __UNIX_LIKE__
: m_switchChars("-")
#else // !Unix
: m_switchChars("/-")
#endif
{ {
m_enableLongOptions = true; m_enableLongOptions = true;
#ifdef __UNIX_LIKE__
m_switchChars = wxT("-");
#else // !Unix
m_switchChars = wxT("/-");
#endif
} }
namespace namespace

View File

@@ -44,9 +44,9 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
wxCommand::wxCommand(bool canUndoIt, const wxString& name) wxCommand::wxCommand(bool canUndoIt, const wxString& name)
: m_commandName(name)
{ {
m_canUndo = canUndoIt; m_canUndo = canUndoIt;
m_commandName = name;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -54,17 +54,15 @@ wxCommand::wxCommand(bool canUndoIt, const wxString& name)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
wxCommandProcessor::wxCommandProcessor(int maxCommands) wxCommandProcessor::wxCommandProcessor(int maxCommands)
#if wxUSE_ACCEL
: m_undoAccelerator('\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Z').ToString())
, m_redoAccelerator('\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Y').ToString())
#endif // wxUSE_ACCEL
{ {
m_maxNoCommands = maxCommands; m_maxNoCommands = maxCommands;
#if wxUSE_MENUS #if wxUSE_MENUS
m_commandEditMenu = NULL; m_commandEditMenu = NULL;
#endif // wxUSE_MENUS #endif // wxUSE_MENUS
#if wxUSE_ACCEL
m_undoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Z').ToString();
m_redoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Y').ToString();
#endif // wxUSE_ACCEL
m_lastSavedCommand = m_lastSavedCommand =
m_currentCommand = wxList::compatibility_iterator(); m_currentCommand = wxList::compatibility_iterator();
} }

View File

@@ -57,6 +57,7 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxPageSetupDialogData, wxObject);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
wxPrintData::wxPrintData() wxPrintData::wxPrintData()
: m_paperSize(wxDefaultSize)
{ {
m_bin = wxPRINTBIN_DEFAULT; m_bin = wxPRINTBIN_DEFAULT;
m_media = wxPRINTMEDIA_DEFAULT; m_media = wxPRINTMEDIA_DEFAULT;
@@ -74,7 +75,6 @@ wxPrintData::wxPrintData()
// we intentionally don't initialize paper id and size at all, like this // we intentionally don't initialize paper id and size at all, like this
// the default system settings will be used for them // the default system settings will be used for them
m_paperId = wxPAPER_NONE; m_paperId = wxPAPER_NONE;
m_paperSize = wxDefaultSize;
m_privData = NULL; m_privData = NULL;
m_privDataLen = 0; m_privDataLen = 0;
@@ -202,6 +202,7 @@ wxPrintDialogData::wxPrintDialogData(const wxPrintDialogData& dialogData)
} }
wxPrintDialogData::wxPrintDialogData(const wxPrintData& printData) wxPrintDialogData::wxPrintDialogData(const wxPrintData& printData)
: m_printData(printData)
{ {
m_printFromPage = 1; m_printFromPage = 1;
m_printToPage = 0; m_printToPage = 0;
@@ -221,7 +222,6 @@ wxPrintDialogData::wxPrintDialogData(const wxPrintData& printData)
m_printEnablePageNumbers = true; m_printEnablePageNumbers = true;
m_printEnablePrintToFile = true; m_printEnablePrintToFile = true;
m_printEnableHelp = false; m_printEnableHelp = false;
m_printData = printData;
} }
wxPrintDialogData::~wxPrintDialogData() wxPrintDialogData::~wxPrintDialogData()
@@ -257,8 +257,6 @@ void wxPrintDialogData::operator=(const wxPrintData& data)
wxPageSetupDialogData::wxPageSetupDialogData() wxPageSetupDialogData::wxPageSetupDialogData()
{ {
m_paperSize = wxSize(0,0);
CalculatePaperSizeFromId(); CalculatePaperSizeFromId();
m_minMarginTopLeft = m_minMarginTopLeft =
@@ -283,13 +281,8 @@ wxPageSetupDialogData::wxPageSetupDialogData(const wxPageSetupDialogData& dialog
} }
wxPageSetupDialogData::wxPageSetupDialogData(const wxPrintData& printData) wxPageSetupDialogData::wxPageSetupDialogData(const wxPrintData& printData)
: m_printData(printData)
{ {
m_paperSize = wxSize(0,0);
m_minMarginTopLeft =
m_minMarginBottomRight =
m_marginTopLeft =
m_marginBottomRight = wxPoint(0,0);
// Flags // Flags
m_defaultMinMargins = false; m_defaultMinMargins = false;
m_enableMargins = true; m_enableMargins = true;
@@ -299,8 +292,6 @@ wxPageSetupDialogData::wxPageSetupDialogData(const wxPrintData& printData)
m_enableHelp = false; m_enableHelp = false;
m_getDefaultInfo = false; m_getDefaultInfo = false;
m_printData = printData;
// The wxPrintData paper size overrides these values, unless the size cannot // The wxPrintData paper size overrides these values, unless the size cannot
// be found. // be found.
CalculatePaperSizeFromId(); CalculatePaperSizeFromId();

View File

@@ -824,15 +824,15 @@ wxDocTemplate::wxDocTemplate(wxDocManager *manager,
wxClassInfo *docClassInfo, wxClassInfo *docClassInfo,
wxClassInfo *viewClassInfo, wxClassInfo *viewClassInfo,
long flags) long flags)
: m_fileFilter(filter)
, m_directory(dir)
, m_description(descr)
, m_defaultExt(ext)
, m_docTypeName(docTypeName)
, m_viewTypeName(viewTypeName)
{ {
m_documentManager = manager; m_documentManager = manager;
m_description = descr;
m_directory = dir;
m_defaultExt = ext;
m_fileFilter = filter;
m_flags = flags; m_flags = flags;
m_docTypeName = docTypeName;
m_viewTypeName = viewTypeName;
m_documentManager->AssociateTemplate(this); m_documentManager->AssociateTemplate(this);
m_docClassInfo = docClassInfo; m_docClassInfo = docClassInfo;

View File

@@ -373,8 +373,8 @@ wxEventFunctor::~wxEventFunctor()
*/ */
wxEvent::wxEvent(int theId, wxEventType commandType) wxEvent::wxEvent(int theId, wxEventType commandType)
: m_eventType(commandType)
{ {
m_eventType = commandType;
m_eventObject = NULL; m_eventObject = NULL;
m_timeStamp = 0; m_timeStamp = 0;
m_id = theId; m_id = theId;
@@ -754,12 +754,12 @@ wxPoint wxMouseEvent::GetLogicalPosition(const wxDC& dc) const
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
wxKeyEvent::wxKeyEvent(wxEventType type) wxKeyEvent::wxKeyEvent(wxEventType type)
#if wxUSE_UNICODE
: m_uniChar(WXK_NONE)
#endif
{ {
m_eventType = type; m_eventType = type;
m_keyCode = WXK_NONE; m_keyCode = WXK_NONE;
#if wxUSE_UNICODE
m_uniChar = WXK_NONE;
#endif
m_x = m_x =
m_y = wxDefaultCoord; m_y = wxDefaultCoord;

View File

@@ -251,9 +251,8 @@ wxFontMgrFontRefData::wxFontMgrFontRefData(int size,
} }
wxFontMgrFontRefData::wxFontMgrFontRefData(const wxFontMgrFontRefData& data) wxFontMgrFontRefData::wxFontMgrFontRefData(const wxFontMgrFontRefData& data)
: m_info(data.m_info)
{ {
m_info = data.m_info;
m_fontFace = data.m_fontFace; m_fontFace = data.m_fontFace;
m_fontBundle = data.m_fontBundle; m_fontBundle = data.m_fontBundle;
m_fontValid = data.m_fontValid; m_fontValid = data.m_fontValid;

View File

@@ -156,12 +156,11 @@ void wxFileTypeInfo::VarArgInit(const wxString *mimeType,
wxFileTypeInfo::wxFileTypeInfo(const wxArrayString& sArray) wxFileTypeInfo::wxFileTypeInfo(const wxArrayString& sArray)
: m_mimeType(sArray[0u])
, m_openCmd( sArray[1u])
, m_printCmd(sArray[2u])
, m_desc( sArray[3u])
{ {
m_mimeType = sArray [0u];
m_openCmd = sArray [1u];
m_printCmd = sArray [2u];
m_desc = sArray [3u];
size_t count = sArray.GetCount(); size_t count = sArray.GetCount();
for ( size_t i = 4; i < count; i++ ) for ( size_t i = 4; i < count; i++ )
{ {

View File

@@ -55,10 +55,10 @@ wxPrintPaperType::wxPrintPaperType()
} }
wxPrintPaperType::wxPrintPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h) wxPrintPaperType::wxPrintPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h)
: m_paperName(name)
{ {
m_paperId = paperId; m_paperId = paperId;
m_platformId = platformId; m_platformId = platformId;
m_paperName = name;
m_width = w; m_width = w;
m_height = h; m_height = h;
} }

View File

@@ -589,8 +589,8 @@ void wxPrintAbortDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
wxIMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject); wxIMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject);
wxPrintout::wxPrintout(const wxString& title) wxPrintout::wxPrintout(const wxString& title)
: m_printoutTitle(title)
{ {
m_printoutTitle = title ;
m_printoutDC = NULL; m_printoutDC = NULL;
m_pageWidthMM = 0; m_pageWidthMM = 0;
m_pageHeightMM = 0; m_pageHeightMM = 0;

View File

@@ -153,12 +153,12 @@ wxTreeEvent::wxTreeEvent(wxEventType commandType, int id)
wxTreeEvent::wxTreeEvent(const wxTreeEvent & event) wxTreeEvent::wxTreeEvent(const wxTreeEvent & event)
: wxNotifyEvent(event) : wxNotifyEvent(event)
, m_evtKey(event.m_evtKey)
, m_pointDrag(event.m_pointDrag)
, m_label(event.m_label)
{ {
m_evtKey = event.m_evtKey;
m_item = event.m_item; m_item = event.m_item;
m_itemOld = event.m_itemOld; m_itemOld = event.m_itemOld;
m_pointDrag = event.m_pointDrag;
m_label = event.m_label;
m_editCancelled = event.m_editCancelled; m_editCancelled = event.m_editCancelled;
} }

View File

@@ -77,18 +77,17 @@ void wxVariant::Clear()
wxVariant::wxVariant(const wxVariant& variant) wxVariant::wxVariant(const wxVariant& variant)
: wxObject() : wxObject()
, m_name(variant.m_name)
{ {
if (!variant.IsNull()) if (!variant.IsNull())
Ref(variant); Ref(variant);
m_name = variant.m_name;
} }
wxVariant::wxVariant(wxVariantData* data, const wxString& name) // User-defined data wxVariant::wxVariant(wxVariantData* data, const wxString& name) // User-defined data
: wxObject() : wxObject()
, m_name(name)
{ {
m_refData = data; m_refData = data;
m_name = name;
} }
wxVariant::~wxVariant() wxVariant::~wxVariant()
@@ -690,8 +689,8 @@ bool wxVariant::GetBool() const
class WXDLLIMPEXP_BASE wxVariantDataChar: public wxVariantData class WXDLLIMPEXP_BASE wxVariantDataChar: public wxVariantData
{ {
public: public:
wxVariantDataChar() { m_value = 0; } wxVariantDataChar() : m_value(0) { }
wxVariantDataChar(const wxUniChar& value) { m_value = value; } wxVariantDataChar(const wxUniChar& value) : m_value(value) { }
inline wxUniChar GetValue() const { return m_value; } inline wxUniChar GetValue() const { return m_value; }
inline void SetValue(const wxUniChar& value) { m_value = value; } inline void SetValue(const wxUniChar& value) { m_value = value; }
@@ -844,7 +843,7 @@ class WXDLLIMPEXP_BASE wxVariantDataString: public wxVariantData
{ {
public: public:
wxVariantDataString() { } wxVariantDataString() { }
wxVariantDataString(const wxString& value) { m_value = value; } wxVariantDataString(const wxString& value) : m_value(value) { }
inline wxString GetValue() const { return m_value; } inline wxString GetValue() const { return m_value; }
inline void SetValue(const wxString& value) { m_value = value; } inline void SetValue(const wxString& value) { m_value = value; }
@@ -1278,7 +1277,7 @@ class wxVariantDataDateTime: public wxVariantData
{ {
public: public:
wxVariantDataDateTime() { } wxVariantDataDateTime() { }
wxVariantDataDateTime(const wxDateTime& value) { m_value = value; } wxVariantDataDateTime(const wxDateTime& value) : m_value(value) { }
inline wxDateTime GetValue() const { return m_value; } inline wxDateTime GetValue() const { return m_value; }
inline void SetValue(const wxDateTime& value) { m_value = value; } inline void SetValue(const wxDateTime& value) { m_value = value; }
@@ -1411,7 +1410,7 @@ class wxVariantDataArrayString: public wxVariantData
{ {
public: public:
wxVariantDataArrayString() { } wxVariantDataArrayString() { }
wxVariantDataArrayString(const wxArrayString& value) { m_value = value; } wxVariantDataArrayString(const wxArrayString& value) : m_value(value) { }
wxArrayString GetValue() const { return m_value; } wxArrayString GetValue() const { return m_value; }
void SetValue(const wxArrayString& value) { m_value = value; } void SetValue(const wxArrayString& value) { m_value = value; }
@@ -1538,8 +1537,8 @@ wxArrayString wxVariant::GetArrayString() const
class WXDLLIMPEXP_BASE wxVariantDataLongLong : public wxVariantData class WXDLLIMPEXP_BASE wxVariantDataLongLong : public wxVariantData
{ {
public: public:
wxVariantDataLongLong() { m_value = 0; } wxVariantDataLongLong() : m_value(0) { }
wxVariantDataLongLong(wxLongLong value) { m_value = value; } wxVariantDataLongLong(wxLongLong value) : m_value(value) { }
wxLongLong GetValue() const { return m_value; } wxLongLong GetValue() const { return m_value; }
void SetValue(wxLongLong value) { m_value = value; } void SetValue(wxLongLong value) { m_value = value; }
@@ -1737,8 +1736,8 @@ wxLongLong wxVariant::GetLongLong() const
class WXDLLIMPEXP_BASE wxVariantDataULongLong : public wxVariantData class WXDLLIMPEXP_BASE wxVariantDataULongLong : public wxVariantData
{ {
public: public:
wxVariantDataULongLong() { m_value = 0; } wxVariantDataULongLong() : m_value(0) { }
wxVariantDataULongLong(wxULongLong value) { m_value = value; } wxVariantDataULongLong(wxULongLong value) : m_value(value) { }
wxULongLong GetValue() const { return m_value; } wxULongLong GetValue() const { return m_value; }
void SetValue(wxULongLong value) { m_value = value; } void SetValue(wxULongLong value) { m_value = value; }

View File

@@ -269,6 +269,8 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase);
// the default initialization // the default initialization
wxWindowBase::wxWindowBase() wxWindowBase::wxWindowBase()
: m_virtualSize(wxDefaultSize)
, m_bestSizeCache(wxDefaultSize)
{ {
// no window yet, no parent nor children // no window yet, no parent nor children
m_parent = NULL; m_parent = NULL;
@@ -280,9 +282,6 @@ wxWindowBase::wxWindowBase()
m_minHeight = m_minHeight =
m_maxHeight = wxDefaultCoord; m_maxHeight = wxDefaultCoord;
// invalidiated cache value
m_bestSizeCache = wxDefaultSize;
// window are created enabled and visible by default // window are created enabled and visible by default
m_isShown = m_isShown =
m_isEnabled = true; m_isEnabled = true;
@@ -340,8 +339,6 @@ wxWindowBase::wxWindowBase()
m_accessible = NULL; m_accessible = NULL;
#endif #endif
m_virtualSize = wxDefaultSize;
m_scrollHelper = NULL; m_scrollHelper = NULL;
m_windowVariant = wxWINDOW_VARIANT_NORMAL; m_windowVariant = wxWINDOW_VARIANT_NORMAL;

View File

@@ -54,8 +54,8 @@ public:
wxAccelRefData(const wxAccelRefData& data) wxAccelRefData(const wxAccelRefData& data)
: wxObjectRefData() : wxObjectRefData()
, m_accels(data.m_accels)
{ {
m_accels = data.m_accels;
} }
virtual ~wxAccelRefData() virtual ~wxAccelRefData()

View File

@@ -1351,8 +1351,8 @@ wxIMPLEMENT_ABSTRACT_CLASS(wxDataViewProgressRenderer, wxDataViewRenderer);
wxDataViewProgressRenderer::wxDataViewProgressRenderer( const wxString &label, wxDataViewProgressRenderer::wxDataViewProgressRenderer( const wxString &label,
const wxString &varianttype, wxDataViewCellMode mode, int align ) : const wxString &varianttype, wxDataViewCellMode mode, int align ) :
wxDataViewRenderer( varianttype, mode, align ) wxDataViewRenderer( varianttype, mode, align )
, m_label(label)
{ {
m_label = label;
m_value = 0; m_value = 0;
} }
@@ -1521,8 +1521,8 @@ class wxBitmapCanvas: public wxWindow
public: public:
wxBitmapCanvas( wxWindow *parent, const wxBitmap &bitmap, const wxSize &size ) : wxBitmapCanvas( wxWindow *parent, const wxBitmap &bitmap, const wxSize &size ) :
wxWindow( parent, wxID_ANY, wxPoint(0,0), size ) wxWindow( parent, wxID_ANY, wxPoint(0,0), size )
, m_bitmap(bitmap)
{ {
m_bitmap = bitmap;
Bind(wxEVT_PAINT, &wxBitmapCanvas::OnPaint, this); Bind(wxEVT_PAINT, &wxBitmapCanvas::OnPaint, this);
} }

View File

@@ -283,9 +283,9 @@ static int wxCMPFUNC_CONV wxDirCtrlStringCompareFunction(const wxString& strFirs
wxDirItemData::wxDirItemData(const wxString& path, const wxString& name, wxDirItemData::wxDirItemData(const wxString& path, const wxString& name,
bool isDir) bool isDir)
: m_path(path)
, m_name(name)
{ {
m_path = path;
m_name = name;
/* Insert logic to detect hidden files here /* Insert logic to detect hidden files here
* In UnixLand we just check whether the first char is a dot * In UnixLand we just check whether the first char is a dot
* For FileNameFromPath read LastDirNameInThisPath ;-) */ * For FileNameFromPath read LastDirNameInThisPath ;-) */
@@ -1441,10 +1441,10 @@ public:
}; };
wxFileIconsTable::wxFileIconsTable() wxFileIconsTable::wxFileIconsTable()
: m_size(16, 16)
{ {
m_HashTable = NULL; m_HashTable = NULL;
m_smallImageList = NULL; m_smallImageList = NULL;
m_size = wxSize(16, 16);
} }
wxFileIconsTable::~wxFileIconsTable() wxFileIconsTable::~wxFileIconsTable()

View File

@@ -177,9 +177,9 @@ void wxGridCellDateRenderer::SetParameters(const wxString& params)
wxGridCellDateTimeRenderer::wxGridCellDateTimeRenderer(const wxString& outformat, const wxString& informat) wxGridCellDateTimeRenderer::wxGridCellDateTimeRenderer(const wxString& outformat, const wxString& informat)
: wxGridCellDateRenderer(outformat) : wxGridCellDateRenderer(outformat)
, m_iformat(informat)
, m_dateDef(wxDefaultDateTime)
{ {
m_iformat = informat;
m_dateDef = wxDefaultDateTime;
} }
wxGridCellRenderer *wxGridCellDateTimeRenderer::Clone() const wxGridCellRenderer *wxGridCellDateTimeRenderer::Clone() const

View File

@@ -134,7 +134,8 @@ public:
wxString doc; wxString doc;
wxExtHelpMapEntry(int iid, wxString const &iurl, wxString const &idoc) wxExtHelpMapEntry(int iid, wxString const &iurl, wxString const &idoc)
{ entryid = iid; url = iurl; doc = idoc; } : entryid(iid), url(iurl), doc(idoc)
{ }
}; };
void wxExtHelpController::DeleteList() void wxExtHelpController::DeleteList()

View File

@@ -123,8 +123,7 @@ public:
m_dc(dc), m_dc(dc),
m_rect(rect), m_rect(rect),
m_flags(flags) m_flags(flags)
{ , m_pos(m_rect.x)
m_pos = m_rect.x;
// We don't initialize the base class initial text background colour to // We don't initialize the base class initial text background colour to
// the valid value because we want to be able to detect when we revert // the valid value because we want to be able to detect when we revert
@@ -134,7 +133,8 @@ public:
// background isn't used anyhow when the background mode is transparent // background isn't used anyhow when the background mode is transparent
// but it might affect the caller if it sets the background mode to // but it might affect the caller if it sets the background mode to
// opaque and draws some text after using us. // opaque and draws some text after using us.
m_origTextBackground = dc.GetTextBackground(); , m_origTextBackground(dc.GetTextBackground())
{
} }
virtual void OnAttrStart(const Attr& attr) wxOVERRIDE virtual void OnAttrStart(const Attr& attr) wxOVERRIDE

View File

@@ -144,8 +144,8 @@ wxSplashScreenWindow::wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* par
wxWindowID id, const wxPoint& pos, wxWindowID id, const wxPoint& pos,
const wxSize& size, long style) const wxSize& size, long style)
: wxWindow(parent, id, pos, size, style) : wxWindow(parent, id, pos, size, style)
, m_bitmap(bitmap)
{ {
m_bitmap = bitmap;
#if !defined(__WXGTK__) && wxUSE_PALETTE #if !defined(__WXGTK__) && wxUSE_PALETTE
bool hiColour = (wxDisplayDepth() >= 16) ; bool hiColour = (wxDisplayDepth() >= 16) ;

View File

@@ -24,17 +24,17 @@ class wxBrushRefData: public wxGDIRefData
{ {
public: public:
wxBrushRefData(const wxColour& colour = wxNullColour, wxBrushStyle style = wxBRUSHSTYLE_SOLID) wxBrushRefData(const wxColour& colour = wxNullColour, wxBrushStyle style = wxBRUSHSTYLE_SOLID)
: m_colour(colour)
{ {
m_style = style; m_style = style;
m_colour = colour;
} }
wxBrushRefData( const wxBrushRefData& data ) wxBrushRefData( const wxBrushRefData& data )
: wxGDIRefData() : wxGDIRefData()
, m_colour(data.m_colour)
, m_stipple(data.m_stipple)
{ {
m_style = data.m_style; m_style = data.m_style;
m_stipple = data.m_stipple;
m_colour = data.m_colour;
} }
bool operator == (const wxBrushRefData& data) const bool operator == (const wxBrushRefData& data) const

View File

@@ -320,9 +320,9 @@ class wxGtkTreeModelNode
public: public:
wxGtkTreeModelNode( wxGtkTreeModelNode* parent, const wxDataViewItem &item, wxGtkTreeModelNode( wxGtkTreeModelNode* parent, const wxDataViewItem &item,
wxDataViewCtrlInternal *internal ) wxDataViewCtrlInternal *internal )
: m_item(item)
{ {
m_parent = parent; m_parent = parent;
m_item = item;
m_internal = internal; m_internal = internal;
} }
@@ -2771,8 +2771,8 @@ wxIMPLEMENT_CLASS(wxDataViewProgressRenderer, wxDataViewCustomRenderer);
wxDataViewProgressRenderer::wxDataViewProgressRenderer( const wxString &label, wxDataViewProgressRenderer::wxDataViewProgressRenderer( const wxString &label,
const wxString &varianttype, wxDataViewCellMode mode, int align ) : const wxString &varianttype, wxDataViewCellMode mode, int align ) :
wxDataViewCustomRenderer( varianttype, mode, align, true ) wxDataViewCustomRenderer( varianttype, mode, align, true )
, m_label(label)
{ {
m_label = label;
m_value = 0; m_value = 0;
m_renderer = (GtkCellRenderer*) gtk_cell_renderer_progress_new(); m_renderer = (GtkCellRenderer*) gtk_cell_renderer_progress_new();
@@ -2870,8 +2870,8 @@ wxSize wxDataViewProgressRenderer::GetSize() const
wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString &choices, wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString &choices,
wxDataViewCellMode mode, int alignment ) : wxDataViewCellMode mode, int alignment ) :
wxDataViewCustomRenderer( "string", mode, alignment, true ) wxDataViewCustomRenderer( "string", mode, alignment, true )
, m_choices(choices)
{ {
m_choices = choices;
m_renderer = (GtkCellRenderer*) gtk_cell_renderer_combo_new(); m_renderer = (GtkCellRenderer*) gtk_cell_renderer_combo_new();
GtkListStore *store = gtk_list_store_new( 1, G_TYPE_STRING ); GtkListStore *store = gtk_list_store_new( 1, G_TYPE_STRING );
for (size_t n = 0; n < m_choices.GetCount(); n++) for (size_t n = 0; n < m_choices.GetCount(); n++)

View File

@@ -36,23 +36,23 @@ public:
wxPenRefData( const wxPenRefData& data ) wxPenRefData( const wxPenRefData& data )
: wxGDIRefData() : wxGDIRefData()
, m_colour(data.m_colour)
{ {
m_style = data.m_style; m_style = data.m_style;
m_width = data.m_width; m_width = data.m_width;
m_joinStyle = data.m_joinStyle; m_joinStyle = data.m_joinStyle;
m_capStyle = data.m_capStyle; m_capStyle = data.m_capStyle;
m_colour = data.m_colour;
m_countDashes = data.m_countDashes; m_countDashes = data.m_countDashes;
m_dash = data.m_dash; m_dash = data.m_dash;
} }
wxPenRefData( const wxPenInfo& info ) wxPenRefData( const wxPenInfo& info )
: m_colour(info.GetColour())
{ {
m_width = info.GetWidth(); m_width = info.GetWidth();
m_style = info.GetStyle(); m_style = info.GetStyle();
m_joinStyle = info.GetJoin(); m_joinStyle = info.GetJoin();
m_capStyle = info.GetCap(); m_capStyle = info.GetCap();
m_colour = info.GetColour();
m_countDashes = info.GetDashes(const_cast<wxDash**>(&m_dash)); m_countDashes = info.GetDashes(const_cast<wxDash**>(&m_dash));
} }

View File

@@ -1210,9 +1210,8 @@ wxIMPLEMENT_ABSTRACT_CLASS(wxGtkPrinterDCImpl, wxDCImpl);
wxGtkPrinterDCImpl::wxGtkPrinterDCImpl(wxPrinterDC *owner, const wxPrintData& data) wxGtkPrinterDCImpl::wxGtkPrinterDCImpl(wxPrinterDC *owner, const wxPrintData& data)
: wxDCImpl( owner ) : wxDCImpl( owner )
, m_printData(data)
{ {
m_printData = data;
wxGtkPrintNativeData *native = wxGtkPrintNativeData *native =
(wxGtkPrintNativeData*) m_printData.GetNativeData(); (wxGtkPrintNativeData*) m_printData.GetNativeData();

View File

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

View File

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

View File

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

View File

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

View File

@@ -137,9 +137,8 @@ wxPrinterDC::wxPrinterDC(const wxString& driver_name,
wxPrinterDCImpl::wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& printData ) : wxPrinterDCImpl::wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& printData ) :
wxMSWDCImpl( owner ) wxMSWDCImpl( owner )
, m_printData(printData)
{ {
m_printData = printData;
m_isInteractive = false; m_isInteractive = false;
m_hDC = wxGetPrinterDC(printData); m_hDC = wxGetPrinterDC(printData);

View File

@@ -204,9 +204,9 @@ private:
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
wxDirData::wxDirData(const wxString& dirname) wxDirData::wxDirData(const wxString& dirname)
: m_dirname(dirname) : m_finddata(InitFindData())
, m_dirname(dirname)
{ {
m_finddata = InitFindData();
} }
wxDirData::~wxDirData() wxDirData::~wxDirData()

View File

@@ -260,9 +260,9 @@ wxSize wxMacCarbonPrinterDC::GetPPI() const
wxPrinterDCImpl::wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& printdata ) wxPrinterDCImpl::wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& printdata )
: wxGCDCImpl( owner ) : wxGCDCImpl( owner )
, m_printData(printdata)
{ {
m_ok = false ; m_ok = false ;
m_printData = printdata ;
m_printData.ConvertToNative() ; m_printData.ConvertToNative() ;
m_nativePrinterDC = wxNativePrinterDC::Create( &m_printData ) ; m_nativePrinterDC = wxNativePrinterDC::Create( &m_printData ) ;
if ( m_nativePrinterDC ) if ( m_nativePrinterDC )

View File

@@ -244,8 +244,8 @@ namespace
wxFontRefData::wxFontRefData(const wxFontRefData& data) wxFontRefData::wxFontRefData(const wxFontRefData& data)
: wxGDIRefData() : wxGDIRefData()
, m_info(data.m_info)
{ {
m_info = data.m_info;
m_ctFont = data.m_ctFont; m_ctFont = data.m_ctFont;
m_ctFontAttributes = data.m_ctFontAttributes; m_ctFontAttributes = data.m_ctFontAttributes;
m_cgFont = data.m_cgFont; m_cgFont = data.m_cgFont;

View File

@@ -830,8 +830,8 @@ private :
}; };
wxMacCoreGraphicsFontData::wxMacCoreGraphicsFontData(wxGraphicsRenderer* renderer, const wxFont &font, const wxColour& col) : wxGraphicsObjectRefData( renderer ) wxMacCoreGraphicsFontData::wxMacCoreGraphicsFontData(wxGraphicsRenderer* renderer, const wxFont &font, const wxColour& col) : wxGraphicsObjectRefData( renderer )
, m_colour(col)
{ {
m_colour = col;
m_underlined = font.GetUnderlined(); m_underlined = font.GetUnderlined();
m_strikethrough = font.GetStrikethrough(); m_strikethrough = font.GetStrikethrough();

View File

@@ -70,6 +70,7 @@ wxPenRefData::wxPenRefData()
wxPenRefData::wxPenRefData(const wxPenRefData& data) wxPenRefData::wxPenRefData(const wxPenRefData& data)
: wxGDIRefData() : wxGDIRefData()
, m_colour(data.m_colour)
{ {
m_style = data.m_style; m_style = data.m_style;
m_width = data.m_width; m_width = data.m_width;
@@ -77,7 +78,6 @@ wxPenRefData::wxPenRefData(const wxPenRefData& data)
m_cap = data.m_cap; m_cap = data.m_cap;
m_nbDash = data.m_nbDash; m_nbDash = data.m_nbDash;
m_dash = data.m_dash; m_dash = data.m_dash;
m_colour = data.m_colour;
} }
wxPenRefData::wxPenRefData(const wxPenInfo& info) wxPenRefData::wxPenRefData(const wxPenInfo& info)

View File

@@ -2710,8 +2710,8 @@ wxArrayStringProperty::wxArrayStringProperty( const wxString& label,
const wxString& name, const wxString& name,
const wxArrayString& array ) const wxArrayString& array )
: wxPGProperty(label,name) : wxPGProperty(label,name)
, m_delimiter(',')
{ {
m_delimiter = ',';
SetValue( array ); SetValue( array );
} }

View File

@@ -35,8 +35,8 @@ class wxAccelRefData : public wxObjectRefData
wxAccelRefData(const wxAccelRefData& data) wxAccelRefData(const wxAccelRefData& data)
: wxObjectRefData() : wxObjectRefData()
, m_accels(data.m_accels)
{ {
m_accels = data.m_accels;
} }
virtual ~wxAccelRefData() virtual ~wxAccelRefData()

View File

@@ -136,8 +136,8 @@ class wxBitmapRefData: public wxGDIRefData
} }
wxBitmapRefData( QPixmap pix ) wxBitmapRefData( QPixmap pix )
: m_qtPixmap(pix)
{ {
m_qtPixmap = pix;
m_mask = NULL; m_mask = NULL;
} }

View File

@@ -68,8 +68,8 @@ class wxBrushRefData: public wxGDIRefData
} }
wxBrushRefData( const wxBrushRefData& data ) wxBrushRefData( const wxBrushRefData& data )
: m_qtBrush(data.m_qtBrush)
{ {
m_qtBrush = data.m_qtBrush;
m_style = data.m_style; m_style = data.m_style;
} }

View File

@@ -338,8 +338,8 @@ QWidget *wxCalendarCtrl::GetHandle() const
wxQtCalendarWidget::wxQtCalendarWidget( wxWindow *parent, wxCalendarCtrl *handler ) wxQtCalendarWidget::wxQtCalendarWidget( wxWindow *parent, wxCalendarCtrl *handler )
: wxQtEventSignalHandler< QCalendarWidget, wxCalendarCtrl >( parent, handler ) : wxQtEventSignalHandler< QCalendarWidget, wxCalendarCtrl >( parent, handler )
, m_date(selectedDate())
{ {
m_date = selectedDate();
connect(this, &QCalendarWidget::selectionChanged, this, &wxQtCalendarWidget::selectionChanged); connect(this, &QCalendarWidget::selectionChanged, this, &wxQtCalendarWidget::selectionChanged);
connect(this, &QCalendarWidget::activated, this, &wxQtCalendarWidget::activated); connect(this, &QCalendarWidget::activated, this, &wxQtCalendarWidget::activated);
} }

View File

@@ -220,8 +220,8 @@ class wxPenRefData: public wxGDIRefData
wxPenRefData( const wxPenRefData& data ) wxPenRefData( const wxPenRefData& data )
: wxGDIRefData() : wxGDIRefData()
, m_qtPen(data.m_qtPen)
{ {
m_qtPen = data.m_qtPen;
defaultPen(); defaultPen();
} }

View File

@@ -39,8 +39,8 @@ public:
wxRegionRefData( const wxRegionRefData& data ) wxRegionRefData( const wxRegionRefData& data )
: wxGDIRefData() : wxGDIRefData()
, m_qtRegion(data.m_qtRegion)
{ {
m_qtRegion = data.m_qtRegion;
} }
bool operator == (const wxRegionRefData& data) const bool operator == (const wxRegionRefData& data) const

View File

@@ -49,8 +49,8 @@ public:
} }
wxMimeTextFile(const wxString& fname) wxMimeTextFile(const wxString& fname)
: m_fname(fname)
{ {
m_fname = fname;
} }
bool Open() bool Open()