From 4a4bf7eefbc04cb91652031d9a729720d52dde61 Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Mon, 30 Oct 2006 08:07:51 +0000 Subject: [PATCH] Compilation fix for old GCC versions. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/bitmap.h | 7 +++++++ include/wx/gtk1/bitmap.h | 7 +++++++ include/wx/msw/bitmap.h | 2 +- include/wx/os2/bitmap.h | 7 +++++++ include/wx/x11/bitmap.h | 7 +++++++ 5 files changed, 29 insertions(+), 1 deletion(-) diff --git a/include/wx/gtk/bitmap.h b/include/wx/gtk/bitmap.h index b6b32df260..1aadd87f6d 100644 --- a/include/wx/gtk/bitmap.h +++ b/include/wx/gtk/bitmap.h @@ -54,6 +54,13 @@ public: wxBitmap( int width, int height, int depth = -1 ); wxBitmap( const char bits[], int width, int height, int depth = 1 ); wxBitmap( const char* const* bits ); +#if defined (__GNUC__) && __GNUC__ < 3 + // needed for old GCC + wxBitmap(char** data) + { + *this = wxBitmap(wx_const_cast(const char* const*, data)); + } +#endif wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM ); wxBitmap( const wxImage& image, int depth = -1 ) { (void)CreateFromImage(image, depth); } virtual ~wxBitmap(); diff --git a/include/wx/gtk1/bitmap.h b/include/wx/gtk1/bitmap.h index 437771e186..18e2f40f19 100644 --- a/include/wx/gtk1/bitmap.h +++ b/include/wx/gtk1/bitmap.h @@ -68,6 +68,13 @@ public: wxBitmap( int width, int height, int depth = -1 ); wxBitmap( const char bits[], int width, int height, int depth = 1 ); wxBitmap( const char* const* bits ); +#if defined (__GNUC__) && __GNUC__ < 3 + // needed for old GCC + wxBitmap(char** data) + { + *this = wxBitmap(wx_const_cast(const char* const*, data)); + } +#endif wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM ); wxBitmap( const wxImage& image, int depth = -1 ) { (void)CreateFromImage(image, depth); } virtual ~wxBitmap(); diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h index 3a40de04cc..8c73d46b29 100644 --- a/include/wx/msw/bitmap.h +++ b/include/wx/msw/bitmap.h @@ -45,7 +45,7 @@ public: // Initialize with XPM data wxBitmap(const char* const* data); -#ifdef __BORLANDC__ +#if defined(__BORLANDC__) || (defined (__GNUC__) && __GNUC__ < 3) // needed for Borland 5.5 wxBitmap(char** data) { diff --git a/include/wx/os2/bitmap.h b/include/wx/os2/bitmap.h index a809df37ad..b19a965bd9 100644 --- a/include/wx/os2/bitmap.h +++ b/include/wx/os2/bitmap.h @@ -85,6 +85,13 @@ public: // Initialize with XPM data wxBitmap(const char* const* bits); +#if defined (__GNUC__) && __GNUC__ < 3 + // needed for old GCC + wxBitmap(char** data) + { + *this = wxBitmap(wx_const_cast(const char* const*, data)); + } +#endif // Load a resource wxBitmap( int nId diff --git a/include/wx/x11/bitmap.h b/include/wx/x11/bitmap.h index 8ad40183ff..9cf858f893 100644 --- a/include/wx/x11/bitmap.h +++ b/include/wx/x11/bitmap.h @@ -74,6 +74,13 @@ public: wxBitmap( int width, int height, int depth = -1 ); wxBitmap( const char bits[], int width, int height, int depth = 1 ); wxBitmap( const char* const* bits ); +#if defined (__GNUC__) && __GNUC__ < 3 + // needed for old GCC + wxBitmap(char** data) + { + *this = wxBitmap(wx_const_cast(const char* const*, data)); + } +#endif wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM ); virtual ~wxBitmap(); -- 2.45.2