summaryrefslogtreecommitdiff
path: root/src/commandhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-08 03:24:45 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-08 03:24:45 +0300
commit3a31b41edcbac0f06f5f4a784071130b30cf4728 (patch)
treefac92e591d650975020d29384581dcb4493a9b99 /src/commandhandler.cpp
parent373c794746bfe38d7abea0cedc446cb2aaa75c2e (diff)
downloadmv-3a31b41edcbac0f06f5f4a784071130b30cf4728.tar.gz
mv-3a31b41edcbac0f06f5f4a784071130b30cf4728.tar.bz2
mv-3a31b41edcbac0f06f5f4a784071130b30cf4728.tar.xz
mv-3a31b41edcbac0f06f5f4a784071130b30cf4728.zip
Add font cache size to /cacheinfo chat command.
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r--src/commandhandler.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp
index 537d9645a..a20944ff2 100644
--- a/src/commandhandler.cpp
+++ b/src/commandhandler.cpp
@@ -1066,20 +1066,23 @@ void CommandHandler::handleCacheInfo(const std::string &args _UNUSED_,
if (!cache)
return;
+ int all = 0;
debugChatTab->chatLog(_("font cache size"));
std::string str;
for (int f = 0; f < 256; f ++)
{
if (!cache[f].empty())
{
+ all += cache[f].size();
str += strprintf("%d: %u, ", f,
static_cast<unsigned int>(cache[f].size()));
}
}
debugChatTab->chatLog(str);
+ debugChatTab->chatLog(strprintf("%s %d", _("Cache size:"), all));
#ifdef DEBUG_FONT_COUNTERS
debugChatTab->chatLog("");
- debugChatTab->chatLog(_("Created: ") + toString(font->getCreateCounter()));
- debugChatTab->chatLog(_("Deleted: ") + toString(font->getDeleteCounter()));
+ debugChatTab->chatLog(strprintf("%s %d", _("Created:"), font->getCreateCounter()));
+ debugChatTab->chatLog(strprintf("%s %d", _("Deleted:"), font->getDeleteCounter()));
#endif
}