EnumMap: support maps with only one item

This commit is contained in:
Aaron van Geffen 2024-04-28 22:46:12 +02:00
parent 4bb5b07500
commit f280fc56e0
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ public:
{
std::sort(_map.begin(), _map.end(), [](const auto& a, const auto& b) { return a.second < b.second; });
if constexpr (ValueIndexable())
if (ValueIndexable() && _map.size() > 1)
{
_continiousValueIndex = true;
T cur{};