From 4dddb8a2dde675b85bbe28399b921648a22e6be1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 16 Sep 2004 22:36:12 +0000 Subject: [PATCH] fixed gcc warnings about not calling base class ctor explicitly in copy ctors (patch 1028986) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/accel.h | 2 +- include/wx/msw/bitmap.h | 2 +- include/wx/msw/brush.h | 2 +- include/wx/msw/cursor.h | 2 +- include/wx/msw/font.h | 2 +- include/wx/msw/gdiimage.h | 2 +- include/wx/msw/icon.h | 2 +- include/wx/msw/palette.h | 2 +- include/wx/msw/pen.h | 2 +- include/wx/msw/region.h | 4 ++-- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/wx/msw/accel.h b/include/wx/msw/accel.h index 116d4cd598..e68e66b653 100644 --- a/include/wx/msw/accel.h +++ b/include/wx/msw/accel.h @@ -27,7 +27,7 @@ public: wxAcceleratorTable(); // copy ctor - wxAcceleratorTable(const wxAcceleratorTable& accel) { Ref(accel); } + wxAcceleratorTable(const wxAcceleratorTable& accel) : wxObject(accel) { Ref(accel); } // load from .rc resource (Windows specific) wxAcceleratorTable(const wxString& resource); diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h index 701c4a8c9e..90bcc1e7f3 100644 --- a/include/wx/msw/bitmap.h +++ b/include/wx/msw/bitmap.h @@ -46,7 +46,7 @@ public: wxBitmap() { Init(); } // Copy constructors - wxBitmap(const wxBitmap& bitmap) { Init(); Ref(bitmap); } + wxBitmap(const wxBitmap& bitmap) : wxGDIImage(bitmap) { Init(); Ref(bitmap); } // Initialize with raw data wxBitmap(const char bits[], int width, int height, int depth = 1); diff --git a/include/wx/msw/brush.h b/include/wx/msw/brush.h index 4b0b124af4..0b82aed988 100644 --- a/include/wx/msw/brush.h +++ b/include/wx/msw/brush.h @@ -32,7 +32,7 @@ public: wxBrush(); wxBrush(const wxColour& col, int style = wxSOLID); wxBrush(const wxBitmap& stipple); - wxBrush(const wxBrush& brush) { Ref(brush); } + wxBrush(const wxBrush& brush) : wxGDIObject(brush) { Ref(brush); } virtual ~wxBrush(); virtual void SetColour(const wxColour& col); diff --git a/include/wx/msw/cursor.h b/include/wx/msw/cursor.h index 66f082b141..1ff62a2011 100644 --- a/include/wx/msw/cursor.h +++ b/include/wx/msw/cursor.h @@ -26,7 +26,7 @@ class WXDLLEXPORT wxCursor : public wxGDIImage public: // constructors wxCursor(); - wxCursor(const wxCursor& cursor) { Ref(cursor); } + wxCursor(const wxCursor& cursor) : wxGDIImage(cursor) { Ref(cursor); } wxCursor(const wxImage& image); wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1, diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h index eb54983eb6..22708e45ae 100644 --- a/include/wx/msw/font.h +++ b/include/wx/msw/font.h @@ -25,7 +25,7 @@ class WXDLLEXPORT wxFont : public wxFontBase public: // ctors and such wxFont() { Init(); } - wxFont(const wxFont& font) { Init(); Ref(font); } + wxFont(const wxFont& font) : wxFontBase(font) { Init(); Ref(font); } wxFont(int size, int family, diff --git a/include/wx/msw/gdiimage.h b/include/wx/msw/gdiimage.h index 534c9fc99e..97d81bbd9f 100644 --- a/include/wx/msw/gdiimage.h +++ b/include/wx/msw/gdiimage.h @@ -44,7 +44,7 @@ public: m_handle = 0; } - wxGDIImageRefData(const wxGDIImageRefData& data) + wxGDIImageRefData(const wxGDIImageRefData& data) : wxGDIRefData(data) { m_width = data.m_width; m_height = data.m_height; diff --git a/include/wx/msw/icon.h b/include/wx/msw/icon.h index 3a4dab9ba1..f7e3f41ad1 100644 --- a/include/wx/msw/icon.h +++ b/include/wx/msw/icon.h @@ -49,7 +49,7 @@ public: wxIcon() { } // copy - wxIcon(const wxIcon& icon) { Ref(icon); } + wxIcon(const wxIcon& icon) : wxGDIImage(icon) { Ref(icon); } // from raw data wxIcon(const char bits[], int width, int height); diff --git a/include/wx/msw/palette.h b/include/wx/msw/palette.h index 47c8dc83c7..6179d35006 100644 --- a/include/wx/msw/palette.h +++ b/include/wx/msw/palette.h @@ -38,7 +38,7 @@ class WXDLLEXPORT wxPalette: public wxGDIObject public: wxPalette(void); - inline wxPalette(const wxPalette& palette) { Ref(palette); } + inline wxPalette(const wxPalette& palette) : wxGDIObject(palette) { Ref(palette); } wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); ~wxPalette(void); diff --git a/include/wx/msw/pen.h b/include/wx/msw/pen.h index a81ee0a9e6..540a010c0d 100644 --- a/include/wx/msw/pen.h +++ b/include/wx/msw/pen.h @@ -81,7 +81,7 @@ public: wxPen(); wxPen(const wxColour& col, int width = 1, int style = wxSOLID); wxPen(const wxBitmap& stipple, int width); - wxPen(const wxPen& pen) { Ref(pen); } + wxPen(const wxPen& pen) : wxGDIObject(pen) { Ref(pen); } virtual ~wxPen(); wxPen& operator=(const wxPen& pen) diff --git a/include/wx/msw/region.h b/include/wx/msw/region.h index 4539ec1d81..0d14ea4452 100644 --- a/include/wx/msw/region.h +++ b/include/wx/msw/region.h @@ -61,7 +61,7 @@ public: virtual ~wxRegion(); // Copying - wxRegion(const wxRegion& r) + wxRegion(const wxRegion& r) : wxGDIObject(r) { Ref(r); } wxRegion& operator = (const wxRegion& r) { Ref(r); return (*this); } @@ -152,7 +152,7 @@ class WXDLLEXPORT wxRegionIterator : public wxObject public: wxRegionIterator() { Init(); } wxRegionIterator(const wxRegion& region); - wxRegionIterator(const wxRegionIterator& ri) { Init(); *this = ri; } + wxRegionIterator(const wxRegionIterator& ri) : wxObject(ri) { Init(); *this = ri; } wxRegionIterator& operator=(const wxRegionIterator& ri); -- 2.45.2