summaryrefslogtreecommitdiff
path: root/src/resources/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/db')
-rw-r--r--src/resources/db/avatardb.cpp2
-rw-r--r--src/resources/db/badgesdb.cpp6
-rw-r--r--src/resources/db/commandsdb.cpp2
-rw-r--r--src/resources/db/horsedb.cpp8
-rw-r--r--src/resources/db/itemdb.cpp2
-rw-r--r--src/resources/db/moddb.cpp2
-rw-r--r--src/resources/db/npcdialogdb.cpp4
-rw-r--r--src/resources/db/palettedb.cpp3
8 files changed, 15 insertions, 14 deletions
diff --git a/src/resources/db/avatardb.cpp b/src/resources/db/avatardb.cpp
index 5b377b173..b62d13bbf 100644
--- a/src/resources/db/avatardb.cpp
+++ b/src/resources/db/avatardb.cpp
@@ -133,7 +133,7 @@ void AvatarDB::unload()
BeingInfo *AvatarDB::get(const BeingTypeId id)
{
- BeingInfoIterator i = mAvatarInfos.find(id);
+ const BeingInfoIterator i = mAvatarInfos.find(id);
if (i == mAvatarInfos.end())
return BeingInfo::unknown;
else
diff --git a/src/resources/db/badgesdb.cpp b/src/resources/db/badgesdb.cpp
index 1aa6167e2..059a22112 100644
--- a/src/resources/db/badgesdb.cpp
+++ b/src/resources/db/badgesdb.cpp
@@ -82,7 +82,7 @@ void BadgesDB::unload()
const std::string BadgesDB::getPartyBadge(const std::string &name)
{
- BadgesInfosIter it = mParties.find(name);
+ const BadgesInfosIter it = mParties.find(name);
if (it == mParties.end())
return std::string();
return (*it).second;
@@ -90,7 +90,7 @@ const std::string BadgesDB::getPartyBadge(const std::string &name)
const std::string BadgesDB::getNameBadge(const std::string &name)
{
- BadgesInfosIter it = mNames.find(name);
+ const BadgesInfosIter it = mNames.find(name);
if (it == mNames.end())
return std::string();
return (*it).second;
@@ -98,7 +98,7 @@ const std::string BadgesDB::getNameBadge(const std::string &name)
const std::string BadgesDB::getGuildBadge(const std::string &name)
{
- BadgesInfosIter it = mGuilds.find(name);
+ const BadgesInfosIter it = mGuilds.find(name);
if (it == mGuilds.end())
return std::string();
return (*it).second;
diff --git a/src/resources/db/commandsdb.cpp b/src/resources/db/commandsdb.cpp
index 335627c53..2c9d44705 100644
--- a/src/resources/db/commandsdb.cpp
+++ b/src/resources/db/commandsdb.cpp
@@ -85,7 +85,7 @@ void CommandsDB::loadXmlFile(const std::string &fileName)
if (id == -1)
continue;
- CommandsMapIter it = mCommands.find(id);
+ const CommandsMapIter it = mCommands.find(id);
if (it != mCommands.end())
{
logger->log("Commands database: duplicate id: %d", id);
diff --git a/src/resources/db/horsedb.cpp b/src/resources/db/horsedb.cpp
index 27987c657..8ede4ca3a 100644
--- a/src/resources/db/horsedb.cpp
+++ b/src/resources/db/horsedb.cpp
@@ -49,10 +49,10 @@ namespace
}
static void loadDownSprites(XmlNodePtrConst parentNode,
- HorseInfo *currentInfo);
+ HorseInfo *const currentInfo);
static void loadUpSprites(XmlNodePtrConst parentNode,
- HorseInfo *currentInfo);
+ HorseInfo *const currentInfo);
void HorseDB::load()
{
@@ -157,7 +157,7 @@ void HorseDB::loadXmlFile(const std::string &fileName)
}
static void loadDownSprites(XmlNodePtrConst parentNode,
- HorseInfo *currentInfo)
+ HorseInfo *const currentInfo)
{
for_each_xml_child_node(spriteNode, parentNode)
{
@@ -170,7 +170,7 @@ static void loadDownSprites(XmlNodePtrConst parentNode,
}
static void loadUpSprites(XmlNodePtrConst parentNode,
- HorseInfo *currentInfo)
+ HorseInfo *const currentInfo)
{
for_each_xml_child_node(spriteNode, parentNode)
{
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index e953aa433..3b942797d 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -301,7 +301,7 @@ void ItemDB::loadXmlFile(const std::string &fileName, int &tagNum)
const std::string typeStr = XML::getProperty(node, "type", "");
int weight = XML::getProperty(node, "weight", 0);
int view = XML::getProperty(node, "view", 0);
- int cardColor = XML::getProperty(node, "cardColor", -1);
+ const int cardColor = XML::getProperty(node, "cardColor", -1);
const int inherit = XML::getProperty(node, "inherit", -1);
std::string name = XML::langProperty(node, "name", "");
diff --git a/src/resources/db/moddb.cpp b/src/resources/db/moddb.cpp
index 3a803a9af..c76bb8352 100644
--- a/src/resources/db/moddb.cpp
+++ b/src/resources/db/moddb.cpp
@@ -103,7 +103,7 @@ void ModDB::unload()
ModInfo *ModDB::get(const std::string &name)
{
- ModInfoIterator i = mModInfos.find(name);
+ const ModInfoIterator i = mModInfos.find(name);
if (i == mModInfos.end())
return nullptr;
else
diff --git a/src/resources/db/npcdialogdb.cpp b/src/resources/db/npcdialogdb.cpp
index 772a64a45..8b2e19d48 100644
--- a/src/resources/db/npcdialogdb.cpp
+++ b/src/resources/db/npcdialogdb.cpp
@@ -187,7 +187,7 @@ void NpcDialogDB::loadXmlFile(const std::string &fileName)
void NpcDialogDB::deleteDialog(const std::string &name)
{
- DialogsIter it = mDialogs.find(name);
+ const DialogsIter it = mDialogs.find(name);
if (it == mDialogs.end())
return;
@@ -218,7 +218,7 @@ void NpcDialogDB::unload()
NpcDialogInfo *NpcDialogDB::getDialog(const std::string &name)
{
- DialogsIter it = mDialogs.find(name);
+ const DialogsIter it = mDialogs.find(name);
if (it == mDialogs.end())
return nullptr;
return (*it).second;
diff --git a/src/resources/db/palettedb.cpp b/src/resources/db/palettedb.cpp
index a3c1fe4a4..cc27fa292 100644
--- a/src/resources/db/palettedb.cpp
+++ b/src/resources/db/palettedb.cpp
@@ -115,7 +115,8 @@ void PaletteDB::unload()
const DyeColor *PaletteDB::getColor(const std::string &name)
{
- std::map<std::string, DyeColor>::const_iterator it = mColors.find(name);
+ const std::map<std::string, DyeColor>::const_iterator it =
+ mColors.find(name);
if (it != mColors.end())
return &(*it).second;
else