From b285303dc3faa01c9b472fe2323960b3d64848e3 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Wed, 9 Jul 2014 15:24:18 +0200 Subject: core_whowas Clean up GetStats() --- src/coremods/core_whowas.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/coremods/core_whowas.cpp b/src/coremods/core_whowas.cpp index 71fa6d738..0060d0621 100644 --- a/src/coremods/core_whowas.cpp +++ b/src/coremods/core_whowas.cpp @@ -79,13 +79,13 @@ CmdResult CommandWhowas::Handle (const std::vector& parameters, Use std::string CommandWhowas::GetStats() { - int whowas_size = 0; - for (whowas_users::iterator i = whowas.begin(); i != whowas.end(); ++i) + size_t entrycount = 0; + for (whowas_users::const_iterator i = whowas.begin(); i != whowas.end(); ++i) { WhoWas::Nick::List& list = i->second->entries; - whowas_size += list.size(); + entrycount += list.size(); } - return "Whowas entries: " + ConvToStr(whowas_size); + return "Whowas entries: " + ConvToStr(entrycount); } void CommandWhowas::AddToWhoWas(User* user) -- cgit v1.2.3