Fix not respecting case-insensitive functions when converting menus

This commit is contained in:
Jan
2023-12-14 19:32:51 +01:00
parent 0b1120f26f
commit 82f3d4925f
4 changed files with 24 additions and 7 deletions

View File

@ -1,10 +1,15 @@
#include "MenuAssetZoneState.h"
#include "Utils/StringUtils.h"
using namespace menu;
void MenuAssetZoneState::AddFunction(std::unique_ptr<CommonFunctionDef> function)
{
m_functions_by_name.emplace(std::make_pair(function->m_name, function.get()));
std::string lowerCaseFunctionName(function->m_name);
utils::MakeStringLowerCase(lowerCaseFunctionName);
m_functions_by_name.emplace(std::make_pair(lowerCaseFunctionName, function.get()));
m_functions.emplace_back(std::move(function));
}