Core: optimize string splitting

- Mainly affects item loading performance
  - Reduces guild loading time a lot

--HG--
branch : trunk
This commit is contained in:
linencloth
2010-10-21 16:56:51 +02:00
parent f275f8b4b5
commit d9d1ec3670
9 changed files with 64 additions and 55 deletions
+2 -2
View File
@@ -65,11 +65,11 @@ Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team)
if (db_BannedList)
{
Tokens tokens = StrSplit(db_BannedList, " ");
Tokens tokens(db_BannedList, ' ');
Tokens::iterator iter;
for (iter = tokens.begin(); iter != tokens.end(); ++iter)
{
uint64 banned_guid = atol((*iter).c_str());
uint64 banned_guid = atol(*iter);
if (banned_guid)
{
sLog.outDebug("Channel(%s) loaded banned guid:" UI64FMTD "",name.c_str(), banned_guid);