From: Vadim Zeitlin Date: Sun, 31 Aug 2008 15:07:12 +0000 (+0000) Subject: rename ShowCacheStats to wxStrCacheStatsDumper X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8c3b65d941ffaf5c207881ca56bfe9c37b3604c5 rename ShowCacheStats to wxStrCacheStatsDumper git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/string.h b/include/wx/string.h index d8aebef9ac..10a7d9085b 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -637,7 +637,7 @@ private: lenhits; // number of cache hits in length() } ms_cacheStats; - friend struct ShowCacheStats; + friend struct wxStrCacheStatsDumper; #define wxCACHE_PROFILE_FIELD_INC(field) ms_cacheStats.field++ #define wxCACHE_PROFILE_FIELD_ADD(field, val) ms_cacheStats.field += (val) diff --git a/src/common/string.cpp b/src/common/string.cpp index 827099f0a6..82acf49d86 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -76,9 +76,6 @@ static wxStrCacheInitializer gs_stringCacheInit; // not my 6.4.98 version under amd64, so provide this debugging helper to do it #ifdef __WXDEBUG__ -namespace -{ - struct wxStrCacheDumper { static void ShowAll() @@ -100,8 +97,6 @@ struct wxStrCacheDumper } }; -} // anonymous namespace - void wxDumpStrCache() { wxStrCacheDumper::ShowAll(); } #endif // __WXDEBUG__ @@ -110,12 +105,9 @@ void wxDumpStrCache() { wxStrCacheDumper::ShowAll(); } wxString::CacheStats wxString::ms_cacheStats; -namespace +struct wxStrCacheStatsDumper { - -struct ShowCacheStats -{ - ~ShowCacheStats() + ~wxStrCacheStatsDumper() { const wxString::CacheStats& stats = wxString::ms_cacheStats; @@ -140,9 +132,9 @@ struct ShowCacheStats stats.lentot, 100.*float(stats.lenhits)/stats.lentot); } } -} s_showCacheStats; +}; -} // anonymous namespace +static wxStrCacheStatsDumper s_showCacheStats; #endif // wxPROFILE_STRING_CACHE