X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2064113c9d9f81acb851b974a21a5f9170dfe9e2..1cf57808cb146742378d24faa77b9e9482c86b2b:/include/wx/log.h diff --git a/include/wx/log.h b/include/wx/log.h index adab3ceb5b..30e0edb2ca 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -14,6 +14,10 @@ #include "wx/defs.h" +#if wxUSE_THREADS + class WXDLLIMPEXP_FWD_BASE wxCriticalSection; +#endif + // ---------------------------------------------------------------------------- // common constants for use in wxUSE_LOG/!wxUSE_LOG // ---------------------------------------------------------------------------- @@ -302,8 +306,9 @@ protected: #endif // log a message indicating the number of times the previous message was - // repeated; only does something if ms_prevCounter > 0 - static void LogLastRepetitionCountIfNeeded(); + // repeated if ms_prevCounter > 0, does nothing otherwise; return the old + // value of ms_prevCounter + unsigned LogLastRepetitionCountIfNeeded(); private: // static variables @@ -313,6 +318,9 @@ private: // with the number of times it was repeated static bool ms_bRepetCounting; +#if wxUSE_THREADS + static wxCriticalSection ms_prevCS; // protects the ms_prev values below +#endif static wxString ms_prevString; // previous message that was logged static unsigned ms_prevCounter; // how many times it was repeated static time_t ms_prevTimeStamp;// timestamp of the previous message