]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't use dummy "inline" in wxDEPRECATED_CONSTRUCTOR definition.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 19 Dec 2011 12:54:32 +0000 (12:54 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 19 Dec 2011 12:54:32 +0000 (12:54 +0000)
Apparently we need this bogus "inline" for g++ < 3.4 but there is no reason to
use it for the other compilers and this results in linking errors with e.g.
MSVC, so remove it.

Closes #13775.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/defs.h

index edd0e9b5a0c8c8dc50e3941a0ae439c3cf9a1499..ad027be38f6b9e5ab11f83ed5bf9e8b28e47c50c 100644 (file)
@@ -529,15 +529,14 @@ 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 wxCHECK_GCC_VERSION(3, 4) || defined( __DARWIN__ )
-    #define  wxDEPRECATED_CONSTRUCTOR(x) x
-#else
+#if defined(__GNUC__) && !wxCHECK_GCC_VERSION(3, 4)
+    /*
+        We need to add dummy "inline" to allow gcc < 3.4 to handle the
+        deprecation attribute on the constructors.
+    */
     #define  wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED( inline x)
+#else
+    #define  wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED(x)
 #endif
 
 /*