From: Vadim Zeitlin Date: Fri, 8 Feb 2008 08:17:41 +0000 (+0000) Subject: don't redeclare wxYield() if it had been already declared to fix g++ warnings with... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a131b460ac4a9a51fe3cdc6a5833a6d2ad9a7dc6 don't redeclare wxYield() if it had been already declared to fix g++ warnings with -Wredundant-decls git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/app.h b/include/wx/app.h index 21cf8a1ae5..d01c877acf 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -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(); diff --git a/include/wx/utils.h b/include/wx/utils.h index c7ea286b9d..bba48e566a 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -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();