From: Vadim Zeitlin Date: Thu, 22 Dec 2011 16:36:47 +0000 (+0000) Subject: Fix wxLogFormatter compilation under MSW. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e718eb9840a4d4bc5804d44a1ec03a0e6419ccf2 Fix wxLogFormatter compilation under MSW. Fix wxMSW compilation after the changes of r70086. Closes #13792. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/log.cpp b/src/common/log.cpp index e5070691dd..7cc809d803 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -213,7 +213,14 @@ wxLogFormatter::Format(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info) const { - wxString prefix = FormatTime(info.timestamp); + wxString prefix; + + // don't time stamp debug messages under MSW as debug viewers usually + // already have an option to do it +#ifdef __WXMSW__ + if ( level != wxLOG_Debug && level != wxLOG_Trace ) +#endif // __WXMSW__ + prefix = FormatTime(info.timestamp); switch ( level ) { @@ -247,13 +254,7 @@ wxString wxLogFormatter::FormatTime(time_t t) const { wxString str; - - // don't time stamp debug messages under MSW as debug viewers usually - // already have an option to do it -#ifdef __WXMSW__ - if ( level != wxLOG_Debug && level != wxLOG_Trace ) -#endif // __WXMSW__ - wxLog::TimeStamp(&str, t); + wxLog::TimeStamp(&str, t); return str; }