summaryrefslogtreecommitdiff
path: root/src/account-server/storage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/account-server/storage.cpp')
-rw-r--r--src/account-server/storage.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/account-server/storage.cpp b/src/account-server/storage.cpp
index 34a49cfc..96590524 100644
--- a/src/account-server/storage.cpp
+++ b/src/account-server/storage.cpp
@@ -26,10 +26,10 @@
#include "account-server/account.h"
#include "account-server/character.h"
#include "account-server/flooritem.h"
-#include "chat-server/chatchannel.h"
#include "chat-server/guild.h"
#include "chat-server/post.h"
#include "common/configuration.h"
+#include "common/defines.h"
#include "common/manaserv_protocol.h"
#include "dal/dalexcept.h"
#include "dal/dataproviderfactory.h"
@@ -1438,14 +1438,13 @@ std::map<int, Guild*> Storage::getGuildList()
std::list<std::pair<int, int> > members;
for (unsigned j = 0; j < memberInfo.rows(); ++j)
{
- members.push_back(std::pair<int, int>(toUint(memberInfo(j, 0)),
- toUint(memberInfo(j, 1))));
+ members.push_back(std::make_pair(toUint(memberInfo(j, 0)),
+ toUint(memberInfo(j, 1))));
}
for (auto i : members)
{
- CharacterData *character = getCharacter(i.first, nullptr);
- if (character)
+ if (CharacterData *character = getCharacter(i.first, nullptr))
{
character->addGuild(guild.second->getName());
guild.second->addMember(character->getDatabaseID(), i.second);
@@ -1945,7 +1944,6 @@ void Storage::syncDatabase()
}
dal::PerformTransaction transaction(mDb);
- int itemCount = 0;
for_each_xml_child_node(node, rootNode)
{
// Try to load the version of the item database.
@@ -2029,7 +2027,6 @@ void Storage::syncDatabase()
utils::throwError("(Storage::SyncDatabase) "
"SQL query preparation failure #1.");
}
- itemCount++;
}
catch (const dal::DbSqlQueryExecFailure &e)
{