mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-14 00:38:15 -05:00
Fix not respecting case-insensitive functions when converting menus
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "MenuFileParserState.h"
|
||||
|
||||
#include "Utils/StringUtils.h"
|
||||
|
||||
using namespace menu;
|
||||
|
||||
MenuFileParserState::EventHandlerConditionState::EventHandlerConditionState(CommonEventHandlerCondition* condition)
|
||||
@ -32,7 +34,9 @@ MenuFileParserState::MenuFileParserState(const FeatureLevel featureLevel, const
|
||||
{
|
||||
for (const auto& function : zoneState->m_functions)
|
||||
{
|
||||
m_functions_by_name.emplace(std::make_pair(function->m_name, function.get()));
|
||||
std::string lowerCaseName(function->m_name);
|
||||
utils::MakeStringLowerCase(lowerCaseName);
|
||||
m_functions_by_name.emplace(std::make_pair(lowerCaseName, function.get()));
|
||||
}
|
||||
|
||||
for (const auto& menu : zoneState->m_menus)
|
||||
|
Reference in New Issue
Block a user