diff options
author | megamage <none@none> | 2009-04-29 00:26:07 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-29 00:26:07 -0500 |
commit | de11b9e901d1d1caa0634fad541f08f11c5781af (patch) | |
tree | e35503d08ef545e668b8d854da41e0ea6aba3b3b /src/game/PlayerDump.cpp | |
parent | 9dd4b8c98599b0bdccea7b9acb61cb4e7a35da8f (diff) |
[7730] Some optimizantion and code style. Author: zhenya
--HG--
branch : trunk
Diffstat (limited to 'src/game/PlayerDump.cpp')
-rw-r--r-- | src/game/PlayerDump.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/PlayerDump.cpp b/src/game/PlayerDump.cpp index 5879741b61d..5218d9c4a54 100644 --- a/src/game/PlayerDump.cpp +++ b/src/game/PlayerDump.cpp @@ -93,7 +93,7 @@ bool findnth(std::string &str, int n, std::string::size_type &s, std::string::si if (e == std::string::npos) return false; } while(str[e-1] == '\\'); - for(int i = 1; i < n; i++) + for(int i = 1; i < n; ++i) { do { @@ -157,7 +157,7 @@ bool changetoknth(std::string &str, int n, const char *with, bool insert = false uint32 registerNewGuid(uint32 oldGuid, std::map<uint32, uint32> &guidMap, uint32 hiGuid) { - std::map<uint32, uint32>::iterator itr = guidMap.find(oldGuid); + std::map<uint32, uint32>::const_iterator itr = guidMap.find(oldGuid); if(itr != guidMap.end()) return itr->second; @@ -198,7 +198,7 @@ std::string CreateDumpString(char const* tableName, QueryResult *result) std::ostringstream ss; ss << "INSERT INTO "<< _TABLE_SIM_ << tableName << _TABLE_SIM_ << " VALUES ("; Field *fields = result->Fetch(); - for(uint32 i = 0; i < result->GetFieldCount(); i++) + for(uint32 i = 0; i < result->GetFieldCount(); ++i) { if (i == 0) ss << "'"; else ss << ", '"; @@ -364,7 +364,7 @@ std::string PlayerDumpWriter::GetDump(uint32 guid) else sLog.outError("Character DB not have 'character_db_version' table, revision guard query not added to pdump."); - for(int i = 0; i < DUMP_TABLE_COUNT; i++) + for(int i = 0; i < DUMP_TABLE_COUNT; ++i) DumpTable(dump, guid, dumpTables[i].name, dumpTables[i].name, dumpTables[i].type); // TODO: Add instance/group.. @@ -498,7 +498,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s DumpTableType type; uint8 i; - for(i = 0; i < DUMP_TABLE_COUNT; i++) + for(i = 0; i < DUMP_TABLE_COUNT; ++i) { if (tn == dumpTables[i].name) { |