diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-19 19:19:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-19 19:19:11 +0300 |
commit | 67fd3978786c5f3f66b37fe22d0f7d657de69207 (patch) | |
tree | 11a0c80b70910372030e11e01d90fd25e6f73f91 /src/resources/iteminfo.cpp | |
parent | 6de076ae8cd505511388321757f4bf94c22562b2 (diff) | |
download | plus-67fd3978786c5f3f66b37fe22d0f7d657de69207.tar.gz plus-67fd3978786c5f3f66b37fe22d0f7d657de69207.tar.bz2 plus-67fd3978786c5f3f66b37fe22d0f7d657de69207.tar.xz plus-67fd3978786c5f3f66b37fe22d0f7d657de69207.zip |
Add asserts for missing colors in palettes.
Diffstat (limited to 'src/resources/iteminfo.cpp')
-rw-r--r-- | src/resources/iteminfo.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index b23065f60..aa5d81b8e 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -33,6 +33,7 @@ #include "configuration.h" +#include "utils/checkutils.h" #include "utils/dtor.h" #include "debug.h" @@ -415,7 +416,12 @@ std::string ItemInfo::getColorName(const ItemColor idx) const const std::map <ItemColor, ColorDB::ItemColorData>::const_iterator it = mColorsList->find(idx); if (it == mColorsList->end()) + { + reportAlways("Color %d for pallette %s not found", + CAST_S32(idx), + mColorsListName.c_str()); return std::string(); + } return it->second.name; } @@ -427,7 +433,12 @@ std::string ItemInfo::getColor(const ItemColor idx) const const std::map <ItemColor, ColorDB::ItemColorData>::const_iterator it = mColorsList->find(idx); if (it == mColorsList->end()) + { + reportAlways("Color %d for pallette %s not found", + CAST_S32(idx), + mColorsListName.c_str()); return std::string(); + } return it->second.color; } @@ -439,7 +450,12 @@ std::string ItemInfo::getIconColorName(const ItemColor idx) const const std::map <ItemColor, ColorDB::ItemColorData>::const_iterator it = mIconColorsList->find(idx); if (it == mIconColorsList->end()) + { + reportAlways("Color %d for pallette %s not found", + CAST_S32(idx), + mColorsListName.c_str()); return std::string(); + } return it->second.name; } @@ -451,7 +467,12 @@ std::string ItemInfo::getIconColor(const ItemColor idx) const const std::map <ItemColor, ColorDB::ItemColorData>::const_iterator it = mIconColorsList->find(idx); if (it == mIconColorsList->end()) + { + reportAlways("Color %d for pallette %s not found", + CAST_S32(idx), + mColorsListName.c_str()); return std::string(); + } return it->second.color; } |