fix link of wxDateTime inline methods using mingw32
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15824 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -28,14 +28,20 @@ class WXDLLEXPORT wxDateTime;
|
|||||||
class WXDLLEXPORT wxTimeSpan;
|
class WXDLLEXPORT wxTimeSpan;
|
||||||
class WXDLLEXPORT wxDateSpan;
|
class WXDLLEXPORT wxDateSpan;
|
||||||
|
|
||||||
// don't use inline functions in debug builds - we don't care about
|
// a hack: don't use inline functions in debug builds - we don't care about
|
||||||
// performances and this only leads to increased rebuild time (because every
|
// performances and this only leads to increased rebuild time (because every
|
||||||
// time an inline method is changed, all files including the header must be
|
// time an inline method is changed, all files including the header must be
|
||||||
// rebuilt)
|
// rebuilt)
|
||||||
// For Mingw32, causes a link error.
|
|
||||||
|
// For Mingw32, causes a link error. (VZ: why?)
|
||||||
#if defined( __WXDEBUG__) && !defined(__MINGW32__)
|
#if defined( __WXDEBUG__) && !defined(__MINGW32__)
|
||||||
|
#define wxDATETIME_DONT_INLINE
|
||||||
|
|
||||||
#undef inline
|
#undef inline
|
||||||
#define inline
|
#define inline
|
||||||
|
#else
|
||||||
|
// just in case
|
||||||
|
#undef wxDATETIME_DONT_INLINE
|
||||||
#endif // Debug
|
#endif // Debug
|
||||||
|
|
||||||
// not all c-runtimes are based on 1/1/1970 being (time_t) 0
|
// not all c-runtimes are based on 1/1/1970 being (time_t) 0
|
||||||
@@ -1336,14 +1342,16 @@ protected:
|
|||||||
// else than datetime.cpp in debug builds: this minimizes rebuilds if we change
|
// else than datetime.cpp in debug builds: this minimizes rebuilds if we change
|
||||||
// some inline function and the performance doesn't matter in the debug builds.
|
// some inline function and the performance doesn't matter in the debug builds.
|
||||||
|
|
||||||
#if !defined(__WXDEBUG__) || defined(wxDEFINE_TIME_CONSTANTS)
|
#if !defined(wxDATETIME_DONT_INLINE) || defined(wxDEFINE_TIME_CONSTANTS)
|
||||||
#define INCLUDED_FROM_WX_DATETIME_H
|
#define INCLUDED_FROM_WX_DATETIME_H
|
||||||
#include "wx/datetime.inl"
|
#include "wx/datetime.inl"
|
||||||
#undef INCLUDED_FROM_WX_DATETIME_H
|
#undef INCLUDED_FROM_WX_DATETIME_H
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// if we defined it to be empty above, restore it now
|
// if we defined it to be empty above, restore it now
|
||||||
#undef inline
|
#ifdef wxDATETIME_DONT_INLINE
|
||||||
|
#undef inline
|
||||||
|
#endif
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// binary operators
|
// binary operators
|
||||||
|
Reference in New Issue
Block a user