Added index to CharacterData, removed some expensive lookups

This commit is contained in:
2016-08-25 23:23:57 +10:00
parent 518ea93adc
commit 64833f86da
5 changed files with 27 additions and 28 deletions
+1
View File
@@ -141,6 +141,7 @@ int CharacterManager::Load(int owner, std::string handle, std::string avatar) {
CharacterData& newChar = elementMap[uid];
//metadata
newChar.index = uid;
newChar.owner = owner;
newChar.handle = reinterpret_cast<const char*>(sqlite3_column_text(statement, 2));
newChar.avatar = reinterpret_cast<const char*>(sqlite3_column_text(statement, 3));