summaryrefslogtreecommitdiff
path: root/src/resources/hairdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/hairdb.cpp')
-rw-r--r--src/resources/hairdb.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/hairdb.cpp b/src/resources/hairdb.cpp
index ff301a23..09ac14f4 100644
--- a/src/resources/hairdb.cpp
+++ b/src/resources/hairdb.cpp
@@ -104,15 +104,15 @@ std::vector<int> HairDB::getHairStyleIds(int maxId) const
return hairStylesIds;
}
-std::vector<int> HairDB::getHairColorIds(int maxId) const
+std::vector<int> HairDB::getHairColorIds(int minId, int maxId) const
{
std::vector<int> hairColorsIds;
- for (const auto &hairColor : mHairColors)
+ for (const auto &[id, _] : mHairColors)
{
// Don't give ids higher than the requested maximum.
- if (maxId > 0 && hairColor.first > maxId)
+ if ((maxId > 0 && id > maxId) || id < minId)
continue;
- hairColorsIds.push_back(hairColor.first);
+ hairColorsIds.push_back(id);
}
return hairColorsIds;
}