From 74cc3ec18e117a6ea6bc1c23a9b70ff960f4c0ae Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 2 Nov 2008 19:13:54 +0000 Subject: [PATCH] make sure virtual method isn't inlined away git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/dlimpexp.h | 11 +++++++++++ include/wx/osx/core/colour.h | 8 ++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/include/wx/dlimpexp.h b/include/wx/dlimpexp.h index a5daab8ed9..3c0a823edd 100644 --- a/include/wx/dlimpexp.h +++ b/include/wx/dlimpexp.h @@ -132,12 +132,23 @@ #ifdef WXMAKINGDLL_CORE # define WXDLLIMPEXP_CORE WXEXPORT # define WXDLLIMPEXP_DATA_CORE(type) WXEXPORT type +# if defined(HAVE_VISIBILITY) +# define WXDLLIMPEXP_INLINE_CORE WXEXPORT +# else +# define WXDLLIMPEXP_INLINE_CORE +# endif #elif defined(WXUSINGDLL) # define WXDLLIMPEXP_CORE WXIMPORT # define WXDLLIMPEXP_DATA_CORE(type) WXIMPORT type +# if defined(HAVE_VISIBILITY) +# define WXDLLIMPEXP_INLINE_CORE WXIMPORT +# else +# define WXDLLIMPEXP_INLINE_CORE +# endif #else /* not making nor using DLL */ # define WXDLLIMPEXP_CORE # define WXDLLIMPEXP_DATA_CORE(type) type +# define WXDLLIMPEXP_INLINE_CORE #endif #ifdef WXMAKINGDLL_ADV diff --git a/include/wx/osx/core/colour.h b/include/wx/osx/core/colour.h index 582d36ec3e..3c6674c589 100644 --- a/include/wx/osx/core/colour.h +++ b/include/wx/osx/core/colour.h @@ -32,10 +32,10 @@ public: // accessors virtual bool IsOk() const { return m_cgColour; } - ChannelType Red() const { return m_red; } - ChannelType Green() const { return m_green; } - ChannelType Blue() const { return m_blue; } - ChannelType Alpha() const { return m_alpha; } + virtual WXDLLIMPEXP_INLINE_CORE ChannelType Red() const { return m_red; } + virtual WXDLLIMPEXP_INLINE_CORE ChannelType Green() const { return m_green; } + virtual WXDLLIMPEXP_INLINE_CORE ChannelType Blue() const { return m_blue; } + virtual WXDLLIMPEXP_INLINE_CORE ChannelType Alpha() const { return m_alpha; } // comparison bool operator == (const wxColour& colour) const; -- 2.45.2