]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing deprecated constructors for osx
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 18 Sep 2008 09:12:32 +0000 (09:12 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 18 Sep 2008 09:12:32 +0000 (09:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/defs.h
include/wx/iconbndl.h
include/wx/image.h

index 7d67449000313ea624c8b8ed881e34f649f3b7c7..393d320a162be51c1b23d90e1ada77edac9287f7 100644 (file)
@@ -582,6 +582,17 @@ typedef short int WXTYPE;
     #define wxDEPRECATED(x) x
 #endif
 
+/*
+    explicitly specifying inline allows gcc < 3.4 to
+    handle the deprecation attribute even in the constructor.
+    doesn't seem to work on Apple's gcc 4.0.1 unless using -O0
+*/
+#if defined( __DARWIN__ ) && !defined(__WXDEBUG__)
+    #define  wxDEPRECATED_CONSTRUCTOR(x) x
+#else
+    #define  wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED( inline x)
+#endif
+    
 /*
    Macro which marks the function as being deprecated but also defines it
    inline.
index 75aa51c653a53131bf3e11159644b90d06dd3766..f2161aff35876baf32eff5c7402ea68a4799128e 100644 (file)
@@ -79,9 +79,8 @@ public:
             AddIcon(file, (wxBitmapType)type);
         }
     )
-    // explicitly specifying inline allows gcc < 3.4 to
-    // handle the deprecation attribute even in the constructor.
-    wxDEPRECATED( inline wxIconBundle (const wxString& file, long type)
+
+    wxDEPRECATED_CONSTRUCTOR( wxIconBundle (const wxString& file, long type)
         {
             AddIcon(file, (wxBitmapType)type);
         }
index 40b17b20e16e8f879882200b3f117c7ace8171f1..b40f7d305dc82e78702adfc1b195381bd5bedd81 100644 (file)
@@ -440,18 +440,16 @@ public:
     static RGBValue HSVtoRGB(const HSVValue& hsv);
 
 #if WXWIN_COMPATIBILITY_2_8
-    // explicitly specifying inline allows gcc < 3.4 to
-    // handle the deprecation attribute even in the constructor.
-    wxDEPRECATED(
-        inline wxImage(const wxString& name, long type, int index = -1)
+    wxDEPRECATED_CONSTRUCTOR(
+        wxImage(const wxString& name, long type, int index = -1)
         {
             LoadFile(name, (wxBitmapType)type, index);
         }
     )
 
 #if wxUSE_STREAMS
-    wxDEPRECATED(
-        inline wxImage(wxInputStream& stream, long type, int index = -1)
+    wxDEPRECATED_CONSTRUCTOR(
+        wxImage(wxInputStream& stream, long type, int index = -1)
         {
             LoadFile(stream, (wxBitmapType)type, index);
         }