From 5e472c1f9f8566b0ba827b95b1dc1f07ba528ef2 Mon Sep 17 00:00:00 2001 From: Gilles Depeyrot Date: Wed, 8 May 2002 13:17:53 +0000 Subject: [PATCH] corrected warnings when compiled with -Wall -W git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/cmndata.h | 25 +++++++++++++++++++++++-- src/common/cmndata.cpp | 12 ++++++++++-- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/include/wx/cmndata.h b/include/wx/cmndata.h index 008338a944..8f58b83962 100644 --- a/include/wx/cmndata.h +++ b/include/wx/cmndata.h @@ -58,6 +58,27 @@ public: wxFontData(); ~wxFontData(); + wxFontData(const wxFontData& data) + : wxObject() + , fontColour(data.fontColour) + , showHelp(data.showHelp) + , allowSymbols(data.allowSymbols) + , enableEffects(data.enableEffects) + , initialFont(data.initialFont) + , chosenFont(data.chosenFont) + , minSize(data.minSize) + , maxSize(data.maxSize) + , m_encoding(data.m_encoding) + , m_encodingInfo(data.m_encodingInfo) + { + } + + wxFontData& operator=(const wxFontData& data) + { + (*this) = data; + return *this; + } + void SetAllowSymbols(bool flag) { allowSymbols = flag; } bool GetAllowSymbols() const { return allowSymbols; } @@ -380,8 +401,8 @@ public: // Use paper id in wxPrintData to set this object's paper size void CalculatePaperSizeFromId(); - void operator=(const wxPageSetupData& data); - void operator=(const wxPrintData& data); + wxPageSetupDialogData& operator=(const wxPageSetupData& data); + wxPageSetupDialogData& operator=(const wxPrintData& data); wxPrintData& GetPrintData() { return m_printData; } void SetPrintData(const wxPrintData& printData) { m_printData = printData; } diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 2fe0f2ff51..78471439df 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -121,6 +121,7 @@ wxColourData::wxColourData() } wxColourData::wxColourData(const wxColourData& data) + : wxObject() { (*this) = data; } @@ -264,6 +265,7 @@ wxPrintData::wxPrintData() } wxPrintData::wxPrintData(const wxPrintData& printData) + : wxObject() { #ifdef __WXMSW__ m_devMode = (void*) NULL; @@ -878,6 +880,7 @@ wxPrintDialogData::wxPrintDialogData() } wxPrintDialogData::wxPrintDialogData(const wxPrintDialogData& dialogData) + : wxObject() { #ifdef __WXMSW__ m_printDlgData = NULL; @@ -1172,6 +1175,7 @@ wxPageSetupDialogData::wxPageSetupDialogData() } wxPageSetupDialogData::wxPageSetupDialogData(const wxPageSetupDialogData& dialogData) + : wxObject() { #if defined(__WIN95__) m_pageSetupData = NULL; @@ -1219,7 +1223,7 @@ wxPageSetupDialogData::~wxPageSetupDialogData() #endif } -void wxPageSetupDialogData::operator=(const wxPageSetupDialogData& data) +wxPageSetupDialogData& wxPageSetupDialogData::operator=(const wxPageSetupDialogData& data) { m_paperSize = data.m_paperSize; m_minMarginTopLeft = data.m_minMarginTopLeft; @@ -1235,11 +1239,15 @@ void wxPageSetupDialogData::operator=(const wxPageSetupDialogData& data) m_enableHelp = data.m_enableHelp; m_printData = data.m_printData; + + return *this; } -void wxPageSetupDialogData::operator=(const wxPrintData& data) +wxPageSetupDialogData& wxPageSetupDialogData::operator=(const wxPrintData& data) { m_printData = data; + + return *this; } #if defined(__WIN95__) -- 2.45.2