]> git.saurik.com Git - wxWidgets.git/commitdiff
don't redeclare wxYield() if it had been already declared to fix g++ warnings with...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 8 Feb 2008 08:17:41 +0000 (08:17 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 8 Feb 2008 08:17:41 +0000 (08:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/app.h
include/wx/utils.h

index 21cf8a1ae5e9d73b0ae91517061c9cb4dae65fee..d01c877acf5fb64fe24acd6067e5eca756c19c4a 100644 (file)
@@ -633,9 +633,16 @@ protected:
 // Force an exit from main loop
 extern void WXDLLIMPEXP_BASE wxExit();
 
+// avoid redeclaring this function here if it had been already declated by
+// wx/utils.h, this results in warnings from g++ with -Wredundant-decls
+#ifndef wx_YIELD_DECLARED
+#define wx_YIELD_DECLARED
+
 // Yield to other apps/messages
 extern bool WXDLLIMPEXP_BASE wxYield();
 
+#endif // wx_YIELD_DECLARED
+
 // Yield to other apps/messages
 extern void WXDLLIMPEXP_BASE wxWakeUpIdle();
 
index c7ea286b9dc316177a95838bfca15eeb9c2a6a61..bba48e566ae93d5cfc3c1e3b724287bccc2936a9 100644 (file)
@@ -733,9 +733,16 @@ inline struct _XDisplay *wxGetX11Display()
 // wxYield(): these functions are obsolete, please use wxApp methods instead!
 // ----------------------------------------------------------------------------
 
+// avoid redeclaring this function here if it had been already declated by
+// wx/app.h, this results in warnings from g++ with -Wredundant-decls
+#ifndef wx_YIELD_DECLARED
+#define wx_YIELD_DECLARED
+
 // Yield to other apps/messages
 WXDLLIMPEXP_BASE bool wxYield();
 
+#endif // wx_YIELD_DECLARED
+
 // Like wxYield, but fails silently if the yield is recursive.
 WXDLLIMPEXP_BASE bool wxYieldIfNeeded();