rename ShowCacheStats to wxStrCacheStatsDumper

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-08-31 15:07:12 +00:00
parent 2549484fe5
commit 8c3b65d941
2 changed files with 5 additions and 13 deletions

View File

@ -637,7 +637,7 @@ private:
lenhits; // number of cache hits in length() lenhits; // number of cache hits in length()
} ms_cacheStats; } ms_cacheStats;
friend struct ShowCacheStats; friend struct wxStrCacheStatsDumper;
#define wxCACHE_PROFILE_FIELD_INC(field) ms_cacheStats.field++ #define wxCACHE_PROFILE_FIELD_INC(field) ms_cacheStats.field++
#define wxCACHE_PROFILE_FIELD_ADD(field, val) ms_cacheStats.field += (val) #define wxCACHE_PROFILE_FIELD_ADD(field, val) ms_cacheStats.field += (val)

View File

@ -76,9 +76,6 @@ static wxStrCacheInitializer gs_stringCacheInit;
// not my 6.4.98 version under amd64, so provide this debugging helper to do it // not my 6.4.98 version under amd64, so provide this debugging helper to do it
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
namespace
{
struct wxStrCacheDumper struct wxStrCacheDumper
{ {
static void ShowAll() static void ShowAll()
@ -100,8 +97,6 @@ struct wxStrCacheDumper
} }
}; };
} // anonymous namespace
void wxDumpStrCache() { wxStrCacheDumper::ShowAll(); } void wxDumpStrCache() { wxStrCacheDumper::ShowAll(); }
#endif // __WXDEBUG__ #endif // __WXDEBUG__
@ -110,12 +105,9 @@ void wxDumpStrCache() { wxStrCacheDumper::ShowAll(); }
wxString::CacheStats wxString::ms_cacheStats; wxString::CacheStats wxString::ms_cacheStats;
namespace struct wxStrCacheStatsDumper
{ {
~wxStrCacheStatsDumper()
struct ShowCacheStats
{
~ShowCacheStats()
{ {
const wxString::CacheStats& stats = wxString::ms_cacheStats; const wxString::CacheStats& stats = wxString::ms_cacheStats;
@ -140,9 +132,9 @@ struct ShowCacheStats
stats.lentot, 100.*float(stats.lenhits)/stats.lentot); stats.lentot, 100.*float(stats.lenhits)/stats.lentot);
} }
} }
} s_showCacheStats; };
} // anonymous namespace static wxStrCacheStatsDumper s_showCacheStats;
#endif // wxPROFILE_STRING_CACHE #endif // wxPROFILE_STRING_CACHE