From 1be69a0a513d1abfba0ac955b3174cb2ff10ae8c Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Wed, 22 Jul 2020 17:24:07 +0200 Subject: [PATCH] Fix compile errors --- src/app/moddata.cpp | 6 +++--- src/app/moddata.h | 6 +++--- src/ui/screen/screen_mod_list.cpp | 2 +- src/ui/screen/screen_mod_list.h | 4 +++- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/app/moddata.cpp b/src/app/moddata.cpp index c2653023..4ccf2f8f 100644 --- a/src/app/moddata.cpp +++ b/src/app/moddata.cpp @@ -33,7 +33,7 @@ namespace pt = boost::property_tree; boost::optional LoadManifest(const std::string& path); std::string GetStringProperty(const pt::ptree& manifest, const std::string& key); -std::unordered_map GetLanguageStringProperty(const pt::ptree& manifest, const std::string& key); +std::map GetLanguageStringProperty(const pt::ptree& manifest, const std::string& key); ModData LoadModData(const std::string& path) { @@ -89,9 +89,9 @@ std::string GetStringProperty(const pt::ptree& manifest, const std::string& key) return {}; } -std::unordered_map GetLanguageStringProperty(const pt::ptree& manifest, const std::string& key) +std::map GetLanguageStringProperty(const pt::ptree& manifest, const std::string& key) { - std::unordered_map ret; + std::map ret; auto prop = manifest.get_child_optional(key); if (prop) { diff --git a/src/app/moddata.h b/src/app/moddata.h index 551b701a..3969c812 100644 --- a/src/app/moddata.h +++ b/src/app/moddata.h @@ -21,15 +21,15 @@ #include "common/language.h" -#include +#include struct ModData { - std::unordered_map displayName{}; + std::map displayName{}; std::string author{}; std::string version{}; std::string website{}; - std::unordered_map summary{}; + std::map summary{}; }; //! Loads the metadata for a mod in the given path. diff --git a/src/ui/screen/screen_mod_list.cpp b/src/ui/screen/screen_mod_list.cpp index 8868e0a9..852e08f7 100644 --- a/src/ui/screen/screen_mod_list.cpp +++ b/src/ui/screen/screen_mod_list.cpp @@ -559,7 +559,7 @@ void CScreenModList::UpdateUpDownButtons() } } -std::string CScreenModList::GetLanguageStringProperty(const std::unordered_map& property, const std::string& fallback) +std::string CScreenModList::GetLanguageStringProperty(const std::map& property, const std::string& fallback) { std::string ret{}; const auto language = m_app->GetLanguage(); diff --git a/src/ui/screen/screen_mod_list.h b/src/ui/screen/screen_mod_list.h index 7be1a133..0da3a7c3 100644 --- a/src/ui/screen/screen_mod_list.h +++ b/src/ui/screen/screen_mod_list.h @@ -25,6 +25,8 @@ #include "ui/screen/screen.h" +#include + namespace Ui { @@ -79,7 +81,7 @@ protected: void UpdateApplyButton(); void UpdateUpDownButtons(); - std::string GetLanguageStringProperty(const std::unordered_map& property, const std::string& fallback); + std::string GetLanguageStringProperty(const std::map& property, const std::string& fallback); protected: Ui::CMainDialog* m_dialog;