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)
 
 // not my 6.4.98 version under amd64, so provide this debugging helper to do it
 #ifdef __WXDEBUG__
 
-namespace
-{
-
 struct wxStrCacheDumper
 {
     static void ShowAll()
     }
 };
 
-} // anonymous namespace
-
 void wxDumpStrCache() { wxStrCacheDumper::ShowAll(); }
 
 #endif // __WXDEBUG__
 
 wxString::CacheStats wxString::ms_cacheStats;
 
-namespace
+struct wxStrCacheStatsDumper
 {
-
-struct ShowCacheStats
-{
-    ~ShowCacheStats()
+    ~wxStrCacheStatsDumper()
     {
         const wxString::CacheStats& stats = wxString::ms_cacheStats;
 
                    stats.lentot, 100.*float(stats.lenhits)/stats.lentot);
         }
     }
-} s_showCacheStats;
+};
 
-} // anonymous namespace
+static wxStrCacheStatsDumper s_showCacheStats;
 
 #endif // wxPROFILE_STRING_CACHE