summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-02-19 10:53:17 -0800
committerJames Cook <james@lindenlab.com>2010-02-19 10:53:17 -0800
commitc1d7e7d5d961819255f6f2fe4de5ece3b80867db (patch)
treeae5e5fcb4c9feae98825f4be679231ddada9050a
parentb77cd684fb5a46bb613df1a73af1856cf39aef84 (diff)
Added clear() method for debugging
-rw-r--r--indra/llmessage/llcachename.cpp6
-rw-r--r--indra/llmessage/llcachename.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp
index 9ca0347f83..eed2beb859 100644
--- a/indra/llmessage/llcachename.cpp
+++ b/indra/llmessage/llcachename.cpp
@@ -674,6 +674,12 @@ void LLCacheName::dumpStats()
<< llendl;
}
+void LLCacheName::clear()
+{
+ for_each(impl.mCache.begin(), impl.mCache.end(), DeletePairedPointer());
+ impl.mCache.clear();
+}
+
//static
std::string LLCacheName::getDefaultName()
{
diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h
index 083975d4ca..6b6bbde6ab 100644
--- a/indra/llmessage/llcachename.h
+++ b/indra/llmessage/llcachename.h
@@ -115,6 +115,7 @@ public:
// Debugging
void dump(); // Dumps the contents of the cache
void dumpStats(); // Dumps the sizes of the cache and associated queues.
+ void clear(); // Deletes all entries from the cache
static std::string getDefaultName();