summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/resources/colordb.cpp5
-rw-r--r--src/resources/colordb.h3
-rw-r--r--src/resources/iteminfo.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/resources/colordb.cpp b/src/resources/colordb.cpp
index d664b2d5b..42669b700 100644
--- a/src/resources/colordb.cpp
+++ b/src/resources/colordb.cpp
@@ -120,7 +120,7 @@ void ColorDB::loadColorLists()
{
if (xmlNameEqual(node, "list"))
{
- std::string name = XML::getProperty(node, "name", "");
+ const std::string name = XML::getProperty(node, "name", "");
if (name.empty())
continue;
@@ -185,7 +185,8 @@ int ColorDB::getHairSize()
return mHairColorsSize;
}
-std::map <int, ColorDB::ItemColor> *ColorDB::getColorsList(std::string name)
+const std::map <int, ColorDB::ItemColor>
+ *ColorDB::getColorsList(const std::string &name)
{
const ColorListsIterator it = mColorLists.find(name);
diff --git a/src/resources/colordb.h b/src/resources/colordb.h
index 75fff94a3..d39abbe9d 100644
--- a/src/resources/colordb.h
+++ b/src/resources/colordb.h
@@ -75,7 +75,8 @@ namespace ColorDB
int getHairSize() A_WARN_UNUSED;
- std::map <int, ItemColor> *getColorsList(std::string name) A_WARN_UNUSED;
+ const std::map <int, ItemColor> *getColorsList(const std::string
+ &name) A_WARN_UNUSED;
// Color DB
typedef std::map<int, ItemColor> Colors;
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index afea431ee..380624b7b 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -330,7 +330,7 @@ class ItemInfo final
/** Stores the names of sounds to be played at certain event. */
std::map <EquipmentSoundEvent, StringVect> mSounds;
std::map <int, int> mTags;
- std::map <int, ColorDB::ItemColor> *mColors;
+ const std::map <int, ColorDB::ItemColor> *mColors;
std::string mColorList;
int mHitEffectId;
int mCriticalHitEffectId;