diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/resources/iteminfo.cpp | 21 | ||||
-rw-r--r-- | src/utils/checkutils.h | 2 |
2 files changed, 23 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; } diff --git a/src/utils/checkutils.h b/src/utils/checkutils.h index 0423a0925..b780af587 100644 --- a/src/utils/checkutils.h +++ b/src/utils/checkutils.h @@ -21,6 +21,8 @@ #ifndef UTILS_CHECKUTILS_H #define UTILS_CHECKUTILS_H +#include "logger.h" + #ifdef ENABLE_ASSERTS #define reportFalseReal(val) \ |