mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 14:58:10 -05:00
Do not parse menus more than once when they have already been parsed
This commit is contained in:
@ -12,3 +12,8 @@ void MenuAssetZoneState::AddMenu(std::unique_ptr<CommonMenuDef> menu)
|
||||
{
|
||||
m_menus.emplace_back(std::move(menu));
|
||||
}
|
||||
|
||||
void MenuAssetZoneState::AddMenusToLoad(std::string menuName, std::vector<std::string> menusToLoad)
|
||||
{
|
||||
m_menus_to_load_by_menu.emplace(std::make_pair(std::move(menuName), std::move(menusToLoad)));
|
||||
}
|
||||
|
@ -16,9 +16,12 @@ namespace menu
|
||||
|
||||
std::map<std::string, CommonFunctionDef*> m_functions_by_name;
|
||||
|
||||
std::map<std::string, std::vector<std::string>> m_menus_to_load_by_menu;
|
||||
|
||||
MenuAssetZoneState() = default;
|
||||
|
||||
void AddFunction(std::unique_ptr<CommonFunctionDef> function);
|
||||
void AddMenu(std::unique_ptr<CommonMenuDef> menu);
|
||||
void AddMenusToLoad(std::string menuName, std::vector<std::string> menusToLoad);
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user