From 7c3ce912e05bf280bb061087560a0ba944a9b2fd Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Mon, 25 Feb 2019 10:23:35 -0800 Subject: [PATCH] Use ctor-initializer rather than assignment for non-POD class members --- include/wx/any.h | 2 +- include/wx/aui/auibar.h | 4 +-- include/wx/aui/framemanager.h | 10 +++---- include/wx/clrpicker.h | 2 +- include/wx/datetime.h | 6 ++-- include/wx/event.h | 4 +-- include/wx/filesys.h | 12 ++++---- include/wx/gtk/private/string.h | 2 +- include/wx/html/helpdata.h | 8 +++--- include/wx/html/htmlcell.h | 4 +-- include/wx/html/htmlwin.h | 4 +-- include/wx/propgrid/advprops.h | 4 +-- include/wx/propgrid/propgrid.h | 2 +- include/wx/variant.h | 2 +- include/wx/versioninfo.h | 6 ++-- src/aui/auibook.cpp | 2 +- src/aui/floatpane.cpp | 2 +- src/aui/tabart.cpp | 50 ++++++++++++++------------------- src/common/cmdline.cpp | 13 ++++----- src/common/cmdproc.cpp | 12 ++++---- src/common/cmndata.cpp | 15 ++-------- src/common/docview.cpp | 12 ++++---- src/common/event.cpp | 8 +++--- src/common/fontmgrcmn.cpp | 3 +- src/common/mimecmn.cpp | 9 +++--- src/common/paper.cpp | 2 +- src/common/prntbase.cpp | 2 +- src/common/treebase.cpp | 6 ++-- src/common/variant.cpp | 23 ++++++++------- src/common/wincmn.cpp | 7 ++--- src/generic/accel.cpp | 2 +- src/generic/datavgen.cpp | 4 +-- src/generic/dirctrlg.cpp | 6 ++-- src/generic/gridctrl.cpp | 4 +-- src/generic/helpext.cpp | 3 +- src/generic/markuptext.cpp | 6 ++-- src/generic/splash.cpp | 2 +- src/gtk/brush.cpp | 6 ++-- src/gtk/dataview.cpp | 6 ++-- src/gtk/pen.cpp | 4 +-- src/gtk/print.cpp | 3 +- src/html/helpdata.cpp | 2 +- src/html/htmlwin.cpp | 4 +-- src/html/m_image.cpp | 4 +-- src/html/m_links.cpp | 2 +- src/msw/dcprint.cpp | 3 +- src/msw/dir.cpp | 4 +-- src/osx/carbon/dcprint.cpp | 2 +- src/osx/carbon/font.cpp | 2 +- src/osx/carbon/graphics.cpp | 2 +- src/osx/pen.cpp | 2 +- src/propgrid/props.cpp | 2 +- src/qt/accel.cpp | 2 +- src/qt/bitmap.cpp | 2 +- src/qt/brush.cpp | 2 +- src/qt/calctrl.cpp | 2 +- src/qt/pen.cpp | 2 +- src/qt/region.cpp | 2 +- src/unix/mimetype.cpp | 2 +- 59 files changed, 150 insertions(+), 177 deletions(-) diff --git a/include/wx/any.h b/include/wx/any.h index bd61b1e7a0..4bf9b0eef4 100644 --- a/include/wx/any.h +++ b/include/wx/any.h @@ -231,8 +231,8 @@ public: { public: DataHolder(const T2& value) + : m_value(value) { - m_value = value; } virtual ~DataHolder() { } diff --git a/include/wx/aui/auibar.h b/include/wx/aui/auibar.h index 22b1ea8379..986575ad83 100644 --- a/include/wx/aui/auibar.h +++ b/include/wx/aui/auibar.h @@ -69,10 +69,10 @@ public: wxAuiToolBarEvent(wxEventType commandType = wxEVT_NULL, int winId = 0) : wxNotifyEvent(commandType, winId) + , m_clickPt(-1, -1) + , m_rect(-1, -1, 0, 0) { m_isDropdownClicked = false; - m_clickPt = wxPoint(-1, -1); - m_rect = wxRect(-1,-1, 0, 0); m_toolId = -1; } wxEvent *Clone() const wxOVERRIDE { return new wxAuiToolBarEvent(*this); } diff --git a/include/wx/aui/framemanager.h b/include/wx/aui/framemanager.h index 73c41dc40e..41cb717ad7 100644 --- a/include/wx/aui/framemanager.h +++ b/include/wx/aui/framemanager.h @@ -148,6 +148,11 @@ class WXDLLIMPEXP_AUI wxAuiPaneInfo public: wxAuiPaneInfo() + : best_size(wxDefaultSize) + , min_size(wxDefaultSize) + , max_size(wxDefaultSize) + , floating_pos(wxDefaultPosition) + , floating_size(wxDefaultSize) { window = NULL; frame = NULL; @@ -156,11 +161,6 @@ public: dock_layer = 0; dock_row = 0; dock_pos = 0; - floating_pos = wxDefaultPosition; - floating_size = wxDefaultSize; - best_size = wxDefaultSize; - min_size = wxDefaultSize; - max_size = wxDefaultSize; dock_proportion = 0; DefaultPane(); diff --git a/include/wx/clrpicker.h b/include/wx/clrpicker.h index 840e0b1123..0530e309de 100644 --- a/include/wx/clrpicker.h +++ b/include/wx/clrpicker.h @@ -40,7 +40,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxColourPickerCtrlNameStr[]; class WXDLLIMPEXP_CORE wxColourPickerWidgetBase { public: - wxColourPickerWidgetBase() { m_colour = *wxBLACK; } + wxColourPickerWidgetBase() : m_colour(*wxBLACK) { } virtual ~wxColourPickerWidgetBase() {} wxColour GetColour() const diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 8ed8dfcbda..cb88987dac 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -464,7 +464,7 @@ public: // ------------------------------------------------------------------------ // 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) inline wxDateTime(time_t timet); @@ -1114,7 +1114,7 @@ public: // ------------------------------------------------------------------------ // construct from internal representation - wxDateTime(const wxLongLong& time) { m_time = time; } + wxDateTime(const wxLongLong& time) : m_time(time) { } // get the internal representation inline wxLongLong GetValue() const; @@ -1343,7 +1343,7 @@ public: // ------------------------------------------------------------------------ // construct from internal representation - wxTimeSpan(const wxLongLong& diff) { m_diff = diff; } + wxTimeSpan(const wxLongLong& diff) : m_diff(diff) { } // get the internal representation wxLongLong GetValue() const { return m_diff; } diff --git a/include/wx/event.h b/include/wx/event.h index 20f08b1ae2..8b26fe820e 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -160,7 +160,7 @@ public: // The class of wxEvent-derived class carried by the events of this type. 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 // event tables. See wxEventTableEntry::m_eventType for a more thorough @@ -1898,8 +1898,8 @@ public: } wxGestureEvent(const wxGestureEvent& event) : wxEvent(event) + , m_pos(event.m_pos) { - m_pos = event.m_pos; m_isStart = event.m_isStart; m_isEnd = event.m_isEnd; } diff --git a/include/wx/filesys.h b/include/wx/filesys.h index 69311aebb0..c16af4941b 100644 --- a/include/wx/filesys.h +++ b/include/wx/filesys.h @@ -38,14 +38,14 @@ public: , wxDateTime modif #endif // wxUSE_DATETIME ) + : m_Location(loc) + , m_MimeType(mimetype.Lower()) + , m_Anchor(anchor) +#if wxUSE_DATETIME + , m_Modif(modif) +#endif { 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; } diff --git a/include/wx/gtk/private/string.h b/include/wx/gtk/private/string.h index bd188d10f8..051c94132c 100644 --- a/include/wx/gtk/private/string.h +++ b/include/wx/gtk/private/string.h @@ -43,8 +43,8 @@ class wxGtkCollatableString { public: wxGtkCollatableString( const wxString &label, gchar *key ) + : m_label(label) { - m_label = label; m_key = key; } diff --git a/include/wx/html/helpdata.h b/include/wx/html/helpdata.h index 8c4aad9238..2627f78c08 100644 --- a/include/wx/html/helpdata.h +++ b/include/wx/html/helpdata.h @@ -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; } diff --git a/include/wx/html/htmlcell.h b/include/wx/html/htmlcell.h index 5276a7b601..c31475bd05 100644 --- a/include/wx/html/htmlcell.h +++ b/include/wx/html/htmlcell.h @@ -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, diff --git a/include/wx/html/htmlwin.h b/include/wx/html/htmlwin.h index 8a81f1bd52..1dfc31b5cd 100644 --- a/include/wx/html/htmlwin.h +++ b/include/wx/html/htmlwin.h @@ -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; } diff --git a/include/wx/propgrid/advprops.h b/include/wx/propgrid/advprops.h index 7415530438..342d42e816 100644 --- a/include/wx/propgrid/advprops.h +++ b/include/wx/propgrid/advprops.h @@ -81,9 +81,9 @@ public: wxColourPropertyValue( const wxColourPropertyValue& v ) : wxObject() + , m_colour(v.m_colour) { m_type = v.m_type; - m_colour = v.m_colour; } void Init( wxUint32 type, const wxColour& colour ) @@ -94,9 +94,9 @@ public: wxColourPropertyValue( const wxColour& colour ) : wxObject() + , m_colour(colour) { m_type = wxPG_COLOUR_CUSTOM; - m_colour = colour; } wxColourPropertyValue( wxUint32 type ) diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index a7f5f9dd64..68f6eab42c 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -338,8 +338,8 @@ class WXDLLIMPEXP_PROPGRID wxPGCommonValue public: wxPGCommonValue( const wxString& label, wxPGCellRenderer* renderer ) + : m_label(label) { - m_label = label; m_renderer = renderer; renderer->IncRef(); } diff --git a/include/wx/variant.h b/include/wx/variant.h index efb1b5b111..734d7f0dce 100644 --- a/include/wx/variant.h +++ b/include/wx/variant.h @@ -485,7 +485,7 @@ class classname##VariantData: public wxVariantData \ { \ public:\ classname##VariantData() {} \ - classname##VariantData( const classname &value ) { m_value = value; } \ + classname##VariantData( const classname &value ) : m_value(value) { } \ \ classname &GetValue() { return m_value; } \ \ diff --git a/include/wx/versioninfo.h b/include/wx/versioninfo.h index 79469111a6..277e3e146a 100644 --- a/include/wx/versioninfo.h +++ b/include/wx/versioninfo.h @@ -25,13 +25,13 @@ public: int micro = 0, const wxString& description = wxString(), const wxString& copyright = wxString()) + : m_name(name) + , m_description(description) + , m_copyright(copyright) { - m_name = name; m_major = major; m_minor = minor; m_micro = micro; - m_description = description; - m_copyright = copyright; } // Default copy ctor, assignment operator and dtor are ok. diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index 268991d650..a6081dd787 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -3463,8 +3463,8 @@ public: }; wxAuiLayoutObject(const wxSize &size, const wxAuiPaneInfo &pInfo) + : m_size(size) { - m_size = size; m_pInfo = &pInfo; /* To speed up the sorting of the panes, the direction is mapped to a diff --git a/src/aui/floatpane.cpp b/src/aui/floatpane.cpp index 73cf587436..80dee278c7 100644 --- a/src/aui/floatpane.cpp +++ b/src/aui/floatpane.cpp @@ -52,8 +52,8 @@ wxAuiFloatingFrame::wxAuiFloatingFrame(wxWindow* parent, (pane.HasMaximizeButton()?wxMAXIMIZE_BOX:0) | (pane.IsFixed()?0:wxRESIZE_BORDER) ) + , m_ownerMgr(owner_mgr) { - m_ownerMgr = owner_mgr; m_moving = false; m_mgr.SetManagedWindow(this); m_solidDrag = true; diff --git a/src/aui/tabart.cpp b/src/aui/tabart.cpp index 97667be5fa..59d3a796ba 100644 --- a/src/aui/tabart.cpp +++ b/src/aui/tabart.cpp @@ -155,30 +155,25 @@ static const unsigned char list_bits[] = { // -- wxAuiGenericTabArt class implementation -- 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_measuringFont = m_selectedFont; m_fixedTabWidth = wxWindow::FromDIP(100, NULL); m_tabCtrlHeight = 0; + m_flags = 0; 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() @@ -892,9 +887,17 @@ void wxAuiGenericTabArt::SetActiveColour(const wxColour& colour) // -- wxAuiSimpleTabArt class implementation -- 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_measuringFont = m_selectedFont; @@ -913,17 +916,6 @@ wxAuiSimpleTabArt::wxAuiSimpleTabArt() m_selectedBkBrush = wxBrush(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() diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp index 014a57ecbb..1173d007d8 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -156,9 +156,8 @@ struct wxCmdLineOption: public wxCmdLineArgImpl wxCmdLineParamType typ, int fl) : wxCmdLineArgImpl(k, shrt, lng, typ) + , description(desc) { - description = desc; - flags = fl; } @@ -395,13 +394,13 @@ wxCmdLineArgs::const_iterator wxCmdLineArgs::const_iterator::operator -- (int) // ---------------------------------------------------------------------------- wxCmdLineParserData::wxCmdLineParserData() +#ifdef __UNIX_LIKE__ + : m_switchChars("-") +#else // !Unix + : m_switchChars("/-") +#endif { m_enableLongOptions = true; -#ifdef __UNIX_LIKE__ - m_switchChars = wxT("-"); -#else // !Unix - m_switchChars = wxT("/-"); -#endif } namespace diff --git a/src/common/cmdproc.cpp b/src/common/cmdproc.cpp index 09fb2c8478..09b2f3a020 100644 --- a/src/common/cmdproc.cpp +++ b/src/common/cmdproc.cpp @@ -44,9 +44,9 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject); // ---------------------------------------------------------------------------- wxCommand::wxCommand(bool canUndoIt, const wxString& name) + : m_commandName(name) { m_canUndo = canUndoIt; - m_commandName = name; } // ---------------------------------------------------------------------------- @@ -54,17 +54,15 @@ wxCommand::wxCommand(bool canUndoIt, const wxString& name) // ---------------------------------------------------------------------------- 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; #if wxUSE_MENUS m_commandEditMenu = NULL; #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_currentCommand = wxList::compatibility_iterator(); } diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 3b10be6285..92b8ba4633 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -57,6 +57,7 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxPageSetupDialogData, wxObject); // ---------------------------------------------------------------------------- wxPrintData::wxPrintData() + : m_paperSize(wxDefaultSize) { m_bin = wxPRINTBIN_DEFAULT; m_media = wxPRINTMEDIA_DEFAULT; @@ -74,7 +75,6 @@ wxPrintData::wxPrintData() // we intentionally don't initialize paper id and size at all, like this // the default system settings will be used for them m_paperId = wxPAPER_NONE; - m_paperSize = wxDefaultSize; m_privData = NULL; m_privDataLen = 0; @@ -202,6 +202,7 @@ wxPrintDialogData::wxPrintDialogData(const wxPrintDialogData& dialogData) } wxPrintDialogData::wxPrintDialogData(const wxPrintData& printData) + : m_printData(printData) { m_printFromPage = 1; m_printToPage = 0; @@ -221,7 +222,6 @@ wxPrintDialogData::wxPrintDialogData(const wxPrintData& printData) m_printEnablePageNumbers = true; m_printEnablePrintToFile = true; m_printEnableHelp = false; - m_printData = printData; } wxPrintDialogData::~wxPrintDialogData() @@ -257,8 +257,6 @@ void wxPrintDialogData::operator=(const wxPrintData& data) wxPageSetupDialogData::wxPageSetupDialogData() { - m_paperSize = wxSize(0,0); - CalculatePaperSizeFromId(); m_minMarginTopLeft = @@ -283,13 +281,8 @@ wxPageSetupDialogData::wxPageSetupDialogData(const wxPageSetupDialogData& dialog } 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 m_defaultMinMargins = false; m_enableMargins = true; @@ -299,8 +292,6 @@ wxPageSetupDialogData::wxPageSetupDialogData(const wxPrintData& printData) m_enableHelp = false; m_getDefaultInfo = false; - m_printData = printData; - // The wxPrintData paper size overrides these values, unless the size cannot // be found. CalculatePaperSizeFromId(); diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 9c7b8d1c53..8f958f4777 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -824,15 +824,15 @@ wxDocTemplate::wxDocTemplate(wxDocManager *manager, wxClassInfo *docClassInfo, wxClassInfo *viewClassInfo, long flags) + : m_fileFilter(filter) + , m_directory(dir) + , m_description(descr) + , m_defaultExt(ext) + , m_docTypeName(docTypeName) + , m_viewTypeName(viewTypeName) { m_documentManager = manager; - m_description = descr; - m_directory = dir; - m_defaultExt = ext; - m_fileFilter = filter; m_flags = flags; - m_docTypeName = docTypeName; - m_viewTypeName = viewTypeName; m_documentManager->AssociateTemplate(this); m_docClassInfo = docClassInfo; diff --git a/src/common/event.cpp b/src/common/event.cpp index f8721cca24..7c34d5239f 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -373,8 +373,8 @@ wxEventFunctor::~wxEventFunctor() */ wxEvent::wxEvent(int theId, wxEventType commandType) + : m_eventType(commandType) { - m_eventType = commandType; m_eventObject = NULL; m_timeStamp = 0; m_id = theId; @@ -754,12 +754,12 @@ wxPoint wxMouseEvent::GetLogicalPosition(const wxDC& dc) const // ---------------------------------------------------------------------------- wxKeyEvent::wxKeyEvent(wxEventType type) +#if wxUSE_UNICODE + : m_uniChar(WXK_NONE) +#endif { m_eventType = type; m_keyCode = WXK_NONE; -#if wxUSE_UNICODE - m_uniChar = WXK_NONE; -#endif m_x = m_y = wxDefaultCoord; diff --git a/src/common/fontmgrcmn.cpp b/src/common/fontmgrcmn.cpp index 39fc9e4ac5..d4464f16b1 100644 --- a/src/common/fontmgrcmn.cpp +++ b/src/common/fontmgrcmn.cpp @@ -251,9 +251,8 @@ wxFontMgrFontRefData::wxFontMgrFontRefData(int size, } wxFontMgrFontRefData::wxFontMgrFontRefData(const wxFontMgrFontRefData& data) + : m_info(data.m_info) { - m_info = data.m_info; - m_fontFace = data.m_fontFace; m_fontBundle = data.m_fontBundle; m_fontValid = data.m_fontValid; diff --git a/src/common/mimecmn.cpp b/src/common/mimecmn.cpp index ae86108b92..175fcb205e 100644 --- a/src/common/mimecmn.cpp +++ b/src/common/mimecmn.cpp @@ -156,12 +156,11 @@ void wxFileTypeInfo::VarArgInit(const wxString *mimeType, 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(); for ( size_t i = 4; i < count; i++ ) { diff --git a/src/common/paper.cpp b/src/common/paper.cpp index 753978dd76..47c60a2e92 100644 --- a/src/common/paper.cpp +++ b/src/common/paper.cpp @@ -55,10 +55,10 @@ wxPrintPaperType::wxPrintPaperType() } wxPrintPaperType::wxPrintPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h) + : m_paperName(name) { m_paperId = paperId; m_platformId = platformId; - m_paperName = name; m_width = w; m_height = h; } diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index eb046f1840..dd52c006d8 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -589,8 +589,8 @@ void wxPrintAbortDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) wxIMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject); wxPrintout::wxPrintout(const wxString& title) + : m_printoutTitle(title) { - m_printoutTitle = title ; m_printoutDC = NULL; m_pageWidthMM = 0; m_pageHeightMM = 0; diff --git a/src/common/treebase.cpp b/src/common/treebase.cpp index b71e2d07a0..49c0151b97 100644 --- a/src/common/treebase.cpp +++ b/src/common/treebase.cpp @@ -153,12 +153,12 @@ wxTreeEvent::wxTreeEvent(wxEventType commandType, int id) wxTreeEvent::wxTreeEvent(const wxTreeEvent & 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_itemOld = event.m_itemOld; - m_pointDrag = event.m_pointDrag; - m_label = event.m_label; m_editCancelled = event.m_editCancelled; } diff --git a/src/common/variant.cpp b/src/common/variant.cpp index e11e43dfe6..75546b07b4 100644 --- a/src/common/variant.cpp +++ b/src/common/variant.cpp @@ -77,18 +77,17 @@ void wxVariant::Clear() wxVariant::wxVariant(const wxVariant& variant) : wxObject() + , m_name(variant.m_name) { if (!variant.IsNull()) Ref(variant); - - m_name = variant.m_name; } wxVariant::wxVariant(wxVariantData* data, const wxString& name) // User-defined data : wxObject() + , m_name(name) { m_refData = data; - m_name = name; } wxVariant::~wxVariant() @@ -690,8 +689,8 @@ bool wxVariant::GetBool() const class WXDLLIMPEXP_BASE wxVariantDataChar: public wxVariantData { public: - wxVariantDataChar() { m_value = 0; } - wxVariantDataChar(const wxUniChar& value) { m_value = value; } + wxVariantDataChar() : m_value(0) { } + wxVariantDataChar(const wxUniChar& value) : m_value(value) { } inline wxUniChar GetValue() const { return m_value; } inline void SetValue(const wxUniChar& value) { m_value = value; } @@ -844,7 +843,7 @@ class WXDLLIMPEXP_BASE wxVariantDataString: public wxVariantData { public: wxVariantDataString() { } - wxVariantDataString(const wxString& value) { m_value = value; } + wxVariantDataString(const wxString& value) : m_value(value) { } inline wxString GetValue() const { return m_value; } inline void SetValue(const wxString& value) { m_value = value; } @@ -1278,7 +1277,7 @@ class wxVariantDataDateTime: public wxVariantData { public: wxVariantDataDateTime() { } - wxVariantDataDateTime(const wxDateTime& value) { m_value = value; } + wxVariantDataDateTime(const wxDateTime& value) : m_value(value) { } inline wxDateTime GetValue() const { return m_value; } inline void SetValue(const wxDateTime& value) { m_value = value; } @@ -1411,7 +1410,7 @@ class wxVariantDataArrayString: public wxVariantData { public: wxVariantDataArrayString() { } - wxVariantDataArrayString(const wxArrayString& value) { m_value = value; } + wxVariantDataArrayString(const wxArrayString& value) : m_value(value) { } wxArrayString GetValue() const { return m_value; } void SetValue(const wxArrayString& value) { m_value = value; } @@ -1538,8 +1537,8 @@ wxArrayString wxVariant::GetArrayString() const class WXDLLIMPEXP_BASE wxVariantDataLongLong : public wxVariantData { public: - wxVariantDataLongLong() { m_value = 0; } - wxVariantDataLongLong(wxLongLong value) { m_value = value; } + wxVariantDataLongLong() : m_value(0) { } + wxVariantDataLongLong(wxLongLong value) : m_value(value) { } wxLongLong GetValue() const { return m_value; } void SetValue(wxLongLong value) { m_value = value; } @@ -1737,8 +1736,8 @@ wxLongLong wxVariant::GetLongLong() const class WXDLLIMPEXP_BASE wxVariantDataULongLong : public wxVariantData { public: - wxVariantDataULongLong() { m_value = 0; } - wxVariantDataULongLong(wxULongLong value) { m_value = value; } + wxVariantDataULongLong() : m_value(0) { } + wxVariantDataULongLong(wxULongLong value) : m_value(value) { } wxULongLong GetValue() const { return m_value; } void SetValue(wxULongLong value) { m_value = value; } diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index f5c4cd7b7c..1073c4ea4e 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -269,6 +269,8 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase); // the default initialization wxWindowBase::wxWindowBase() + : m_virtualSize(wxDefaultSize) + , m_bestSizeCache(wxDefaultSize) { // no window yet, no parent nor children m_parent = NULL; @@ -280,9 +282,6 @@ wxWindowBase::wxWindowBase() m_minHeight = m_maxHeight = wxDefaultCoord; - // invalidiated cache value - m_bestSizeCache = wxDefaultSize; - // window are created enabled and visible by default m_isShown = m_isEnabled = true; @@ -340,8 +339,6 @@ wxWindowBase::wxWindowBase() m_accessible = NULL; #endif - m_virtualSize = wxDefaultSize; - m_scrollHelper = NULL; m_windowVariant = wxWINDOW_VARIANT_NORMAL; diff --git a/src/generic/accel.cpp b/src/generic/accel.cpp index 10288b59cf..e4382f455d 100644 --- a/src/generic/accel.cpp +++ b/src/generic/accel.cpp @@ -54,8 +54,8 @@ public: wxAccelRefData(const wxAccelRefData& data) : wxObjectRefData() + , m_accels(data.m_accels) { - m_accels = data.m_accels; } virtual ~wxAccelRefData() diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index ada42e388b..d398cc1c5a 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -1351,8 +1351,8 @@ wxIMPLEMENT_ABSTRACT_CLASS(wxDataViewProgressRenderer, wxDataViewRenderer); wxDataViewProgressRenderer::wxDataViewProgressRenderer( const wxString &label, const wxString &varianttype, wxDataViewCellMode mode, int align ) : wxDataViewRenderer( varianttype, mode, align ) + , m_label(label) { - m_label = label; m_value = 0; } @@ -1521,8 +1521,8 @@ class wxBitmapCanvas: public wxWindow public: wxBitmapCanvas( wxWindow *parent, const wxBitmap &bitmap, const wxSize &size ) : wxWindow( parent, wxID_ANY, wxPoint(0,0), size ) + , m_bitmap(bitmap) { - m_bitmap = bitmap; Bind(wxEVT_PAINT, &wxBitmapCanvas::OnPaint, this); } diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index cd5a1970c6..f5cc1e418d 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -283,9 +283,9 @@ static int wxCMPFUNC_CONV wxDirCtrlStringCompareFunction(const wxString& strFirs wxDirItemData::wxDirItemData(const wxString& path, const wxString& name, bool isDir) + : m_path(path) + , m_name(name) { - m_path = path; - m_name = name; /* Insert logic to detect hidden files here * In UnixLand we just check whether the first char is a dot * For FileNameFromPath read LastDirNameInThisPath ;-) */ @@ -1441,10 +1441,10 @@ public: }; wxFileIconsTable::wxFileIconsTable() + : m_size(16, 16) { m_HashTable = NULL; m_smallImageList = NULL; - m_size = wxSize(16, 16); } wxFileIconsTable::~wxFileIconsTable() diff --git a/src/generic/gridctrl.cpp b/src/generic/gridctrl.cpp index 147fc7a926..e4f8df8ffd 100644 --- a/src/generic/gridctrl.cpp +++ b/src/generic/gridctrl.cpp @@ -177,9 +177,9 @@ void wxGridCellDateRenderer::SetParameters(const wxString& params) wxGridCellDateTimeRenderer::wxGridCellDateTimeRenderer(const wxString& outformat, const wxString& informat) : wxGridCellDateRenderer(outformat) + , m_iformat(informat) + , m_dateDef(wxDefaultDateTime) { - m_iformat = informat; - m_dateDef = wxDefaultDateTime; } wxGridCellRenderer *wxGridCellDateTimeRenderer::Clone() const diff --git a/src/generic/helpext.cpp b/src/generic/helpext.cpp index a8070ef340..971c2ee875 100644 --- a/src/generic/helpext.cpp +++ b/src/generic/helpext.cpp @@ -134,7 +134,8 @@ public: wxString doc; wxExtHelpMapEntry(int iid, wxString const &iurl, wxString const &idoc) - { entryid = iid; url = iurl; doc = idoc; } + : entryid(iid), url(iurl), doc(idoc) + { } }; void wxExtHelpController::DeleteList() diff --git a/src/generic/markuptext.cpp b/src/generic/markuptext.cpp index e49938ccab..f10a6d1d4e 100644 --- a/src/generic/markuptext.cpp +++ b/src/generic/markuptext.cpp @@ -123,8 +123,7 @@ public: m_dc(dc), m_rect(rect), 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 // 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 // but it might affect the caller if it sets the background mode to // opaque and draws some text after using us. - m_origTextBackground = dc.GetTextBackground(); + , m_origTextBackground(dc.GetTextBackground()) + { } virtual void OnAttrStart(const Attr& attr) wxOVERRIDE diff --git a/src/generic/splash.cpp b/src/generic/splash.cpp index 6094bd190c..add0af2271 100644 --- a/src/generic/splash.cpp +++ b/src/generic/splash.cpp @@ -144,8 +144,8 @@ wxSplashScreenWindow::wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* par wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : wxWindow(parent, id, pos, size, style) + , m_bitmap(bitmap) { - m_bitmap = bitmap; #if !defined(__WXGTK__) && wxUSE_PALETTE bool hiColour = (wxDisplayDepth() >= 16) ; diff --git a/src/gtk/brush.cpp b/src/gtk/brush.cpp index 4fe673d2bc..a903929e4d 100644 --- a/src/gtk/brush.cpp +++ b/src/gtk/brush.cpp @@ -24,17 +24,17 @@ class wxBrushRefData: public wxGDIRefData { public: wxBrushRefData(const wxColour& colour = wxNullColour, wxBrushStyle style = wxBRUSHSTYLE_SOLID) + : m_colour(colour) { m_style = style; - m_colour = colour; } wxBrushRefData( const wxBrushRefData& data ) : wxGDIRefData() + , m_colour(data.m_colour) + , m_stipple(data.m_stipple) { m_style = data.m_style; - m_stipple = data.m_stipple; - m_colour = data.m_colour; } bool operator == (const wxBrushRefData& data) const diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 6a7811cf1d..d17c2dd2fd 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -320,9 +320,9 @@ class wxGtkTreeModelNode public: wxGtkTreeModelNode( wxGtkTreeModelNode* parent, const wxDataViewItem &item, wxDataViewCtrlInternal *internal ) + : m_item(item) { m_parent = parent; - m_item = item; m_internal = internal; } @@ -2771,8 +2771,8 @@ wxIMPLEMENT_CLASS(wxDataViewProgressRenderer, wxDataViewCustomRenderer); wxDataViewProgressRenderer::wxDataViewProgressRenderer( const wxString &label, const wxString &varianttype, wxDataViewCellMode mode, int align ) : wxDataViewCustomRenderer( varianttype, mode, align, true ) + , m_label(label) { - m_label = label; m_value = 0; m_renderer = (GtkCellRenderer*) gtk_cell_renderer_progress_new(); @@ -2870,8 +2870,8 @@ wxSize wxDataViewProgressRenderer::GetSize() const wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString &choices, wxDataViewCellMode mode, int alignment ) : wxDataViewCustomRenderer( "string", mode, alignment, true ) + , m_choices(choices) { - m_choices = choices; m_renderer = (GtkCellRenderer*) gtk_cell_renderer_combo_new(); GtkListStore *store = gtk_list_store_new( 1, G_TYPE_STRING ); for (size_t n = 0; n < m_choices.GetCount(); n++) diff --git a/src/gtk/pen.cpp b/src/gtk/pen.cpp index 3db6ead31e..e47aa44818 100644 --- a/src/gtk/pen.cpp +++ b/src/gtk/pen.cpp @@ -36,23 +36,23 @@ public: wxPenRefData( const wxPenRefData& data ) : wxGDIRefData() + , m_colour(data.m_colour) { m_style = data.m_style; m_width = data.m_width; m_joinStyle = data.m_joinStyle; m_capStyle = data.m_capStyle; - m_colour = data.m_colour; m_countDashes = data.m_countDashes; m_dash = data.m_dash; } wxPenRefData( const wxPenInfo& info ) + : m_colour(info.GetColour()) { m_width = info.GetWidth(); m_style = info.GetStyle(); m_joinStyle = info.GetJoin(); m_capStyle = info.GetCap(); - m_colour = info.GetColour(); m_countDashes = info.GetDashes(const_cast(&m_dash)); } diff --git a/src/gtk/print.cpp b/src/gtk/print.cpp index 2a5fde7348..247d294f9e 100644 --- a/src/gtk/print.cpp +++ b/src/gtk/print.cpp @@ -1210,9 +1210,8 @@ wxIMPLEMENT_ABSTRACT_CLASS(wxGtkPrinterDCImpl, wxDCImpl); wxGtkPrinterDCImpl::wxGtkPrinterDCImpl(wxPrinterDC *owner, const wxPrintData& data) : wxDCImpl( owner ) + , m_printData(data) { - m_printData = data; - wxGtkPrintNativeData *native = (wxGtkPrintNativeData*) m_printData.GetNativeData(); diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp index 763516e1e5..3a93267e49 100644 --- a/src/html/helpdata.cpp +++ b/src/html/helpdata.cpp @@ -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()) { diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index 5befc5879f..617309a56f 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -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;} diff --git a/src/html/m_image.cpp b/src/html/m_image.cpp index d537b54dcc..a456e5e38f 100644 --- a/src/html/m_image.cpp +++ b/src/html/m_image.cpp @@ -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; diff --git a/src/html/m_links.cpp b/src/html/m_links.cpp index 66dbb10a3b..5acfea0973 100644 --- a/src/html/m_links.cpp +++ b/src/html/m_links.cpp @@ -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), diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index 3bce3361fc..2bcbea8e2b 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -137,9 +137,8 @@ wxPrinterDC::wxPrinterDC(const wxString& driver_name, wxPrinterDCImpl::wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& printData ) : wxMSWDCImpl( owner ) + , m_printData(printData) { - m_printData = printData; - m_isInteractive = false; m_hDC = wxGetPrinterDC(printData); diff --git a/src/msw/dir.cpp b/src/msw/dir.cpp index 04f2e83f5e..dbe22e39d9 100644 --- a/src/msw/dir.cpp +++ b/src/msw/dir.cpp @@ -204,9 +204,9 @@ private: // ---------------------------------------------------------------------------- wxDirData::wxDirData(const wxString& dirname) - : m_dirname(dirname) + : m_finddata(InitFindData()) + , m_dirname(dirname) { - m_finddata = InitFindData(); } wxDirData::~wxDirData() diff --git a/src/osx/carbon/dcprint.cpp b/src/osx/carbon/dcprint.cpp index 9c12d4b688..977b94078f 100644 --- a/src/osx/carbon/dcprint.cpp +++ b/src/osx/carbon/dcprint.cpp @@ -260,9 +260,9 @@ wxSize wxMacCarbonPrinterDC::GetPPI() const wxPrinterDCImpl::wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& printdata ) : wxGCDCImpl( owner ) + , m_printData(printdata) { m_ok = false ; - m_printData = printdata ; m_printData.ConvertToNative() ; m_nativePrinterDC = wxNativePrinterDC::Create( &m_printData ) ; if ( m_nativePrinterDC ) diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp index 73f22a35fb..93d0ffe7c2 100644 --- a/src/osx/carbon/font.cpp +++ b/src/osx/carbon/font.cpp @@ -244,8 +244,8 @@ namespace wxFontRefData::wxFontRefData(const wxFontRefData& data) : wxGDIRefData() + , m_info(data.m_info) { - m_info = data.m_info; m_ctFont = data.m_ctFont; m_ctFontAttributes = data.m_ctFontAttributes; m_cgFont = data.m_cgFont; diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index 6ff597cd02..035190deb4 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -830,8 +830,8 @@ private : }; wxMacCoreGraphicsFontData::wxMacCoreGraphicsFontData(wxGraphicsRenderer* renderer, const wxFont &font, const wxColour& col) : wxGraphicsObjectRefData( renderer ) + , m_colour(col) { - m_colour = col; m_underlined = font.GetUnderlined(); m_strikethrough = font.GetStrikethrough(); diff --git a/src/osx/pen.cpp b/src/osx/pen.cpp index 40c9fba41b..3a485a6f9d 100644 --- a/src/osx/pen.cpp +++ b/src/osx/pen.cpp @@ -70,6 +70,7 @@ wxPenRefData::wxPenRefData() wxPenRefData::wxPenRefData(const wxPenRefData& data) : wxGDIRefData() + , m_colour(data.m_colour) { m_style = data.m_style; m_width = data.m_width; @@ -77,7 +78,6 @@ wxPenRefData::wxPenRefData(const wxPenRefData& data) m_cap = data.m_cap; m_nbDash = data.m_nbDash; m_dash = data.m_dash; - m_colour = data.m_colour; } wxPenRefData::wxPenRefData(const wxPenInfo& info) diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 86d1f98890..f0b2964315 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -2710,8 +2710,8 @@ wxArrayStringProperty::wxArrayStringProperty( const wxString& label, const wxString& name, const wxArrayString& array ) : wxPGProperty(label,name) + , m_delimiter(',') { - m_delimiter = ','; SetValue( array ); } diff --git a/src/qt/accel.cpp b/src/qt/accel.cpp index 6e258f4db8..f12ab0b202 100644 --- a/src/qt/accel.cpp +++ b/src/qt/accel.cpp @@ -35,8 +35,8 @@ class wxAccelRefData : public wxObjectRefData wxAccelRefData(const wxAccelRefData& data) : wxObjectRefData() + , m_accels(data.m_accels) { - m_accels = data.m_accels; } virtual ~wxAccelRefData() diff --git a/src/qt/bitmap.cpp b/src/qt/bitmap.cpp index b64dafb926..28c5d2d30a 100644 --- a/src/qt/bitmap.cpp +++ b/src/qt/bitmap.cpp @@ -136,8 +136,8 @@ class wxBitmapRefData: public wxGDIRefData } wxBitmapRefData( QPixmap pix ) + : m_qtPixmap(pix) { - m_qtPixmap = pix; m_mask = NULL; } diff --git a/src/qt/brush.cpp b/src/qt/brush.cpp index eba37ee9e1..3e23b8f7a5 100644 --- a/src/qt/brush.cpp +++ b/src/qt/brush.cpp @@ -68,8 +68,8 @@ class wxBrushRefData: public wxGDIRefData } wxBrushRefData( const wxBrushRefData& data ) + : m_qtBrush(data.m_qtBrush) { - m_qtBrush = data.m_qtBrush; m_style = data.m_style; } diff --git a/src/qt/calctrl.cpp b/src/qt/calctrl.cpp index 58c629c779..180a07b642 100644 --- a/src/qt/calctrl.cpp +++ b/src/qt/calctrl.cpp @@ -338,8 +338,8 @@ QWidget *wxCalendarCtrl::GetHandle() const wxQtCalendarWidget::wxQtCalendarWidget( wxWindow *parent, wxCalendarCtrl *handler ) : wxQtEventSignalHandler< QCalendarWidget, wxCalendarCtrl >( parent, handler ) + , m_date(selectedDate()) { - m_date = selectedDate(); connect(this, &QCalendarWidget::selectionChanged, this, &wxQtCalendarWidget::selectionChanged); connect(this, &QCalendarWidget::activated, this, &wxQtCalendarWidget::activated); } diff --git a/src/qt/pen.cpp b/src/qt/pen.cpp index 79f196258c..e2bedad819 100644 --- a/src/qt/pen.cpp +++ b/src/qt/pen.cpp @@ -220,8 +220,8 @@ class wxPenRefData: public wxGDIRefData wxPenRefData( const wxPenRefData& data ) : wxGDIRefData() + , m_qtPen(data.m_qtPen) { - m_qtPen = data.m_qtPen; defaultPen(); } diff --git a/src/qt/region.cpp b/src/qt/region.cpp index a85e735292..0af8228d53 100644 --- a/src/qt/region.cpp +++ b/src/qt/region.cpp @@ -39,8 +39,8 @@ public: wxRegionRefData( const wxRegionRefData& data ) : wxGDIRefData() + , m_qtRegion(data.m_qtRegion) { - m_qtRegion = data.m_qtRegion; } bool operator == (const wxRegionRefData& data) const diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index d09a814873..7f619f6048 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -49,8 +49,8 @@ public: } wxMimeTextFile(const wxString& fname) + : m_fname(fname) { - m_fname = fname; } bool Open()