Fix compile errors
parent
2b96eda86d
commit
1be69a0a51
|
@ -33,7 +33,7 @@ namespace pt = boost::property_tree;
|
|||
|
||||
boost::optional<pt::ptree> LoadManifest(const std::string& path);
|
||||
std::string GetStringProperty(const pt::ptree& manifest, const std::string& key);
|
||||
std::unordered_map<Language, std::string> GetLanguageStringProperty(const pt::ptree& manifest, const std::string& key);
|
||||
std::map<Language, std::string> 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<Language, std::string> GetLanguageStringProperty(const pt::ptree& manifest, const std::string& key)
|
||||
std::map<Language, std::string> GetLanguageStringProperty(const pt::ptree& manifest, const std::string& key)
|
||||
{
|
||||
std::unordered_map<Language, std::string> ret;
|
||||
std::map<Language, std::string> ret;
|
||||
auto prop = manifest.get_child_optional(key);
|
||||
if (prop)
|
||||
{
|
||||
|
|
|
@ -21,15 +21,15 @@
|
|||
|
||||
#include "common/language.h"
|
||||
|
||||
#include <unordered_map>
|
||||
#include <map>
|
||||
|
||||
struct ModData
|
||||
{
|
||||
std::unordered_map<Language, std::string> displayName{};
|
||||
std::map<Language, std::string> displayName{};
|
||||
std::string author{};
|
||||
std::string version{};
|
||||
std::string website{};
|
||||
std::unordered_map<Language, std::string> summary{};
|
||||
std::map<Language, std::string> summary{};
|
||||
};
|
||||
|
||||
//! Loads the metadata for a mod in the given path.
|
||||
|
|
|
@ -559,7 +559,7 @@ void CScreenModList::UpdateUpDownButtons()
|
|||
}
|
||||
}
|
||||
|
||||
std::string CScreenModList::GetLanguageStringProperty(const std::unordered_map<Language, std::string>& property, const std::string& fallback)
|
||||
std::string CScreenModList::GetLanguageStringProperty(const std::map<Language, std::string>& property, const std::string& fallback)
|
||||
{
|
||||
std::string ret{};
|
||||
const auto language = m_app->GetLanguage();
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
#include "ui/screen/screen.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
|
||||
|
@ -79,7 +81,7 @@ protected:
|
|||
void UpdateApplyButton();
|
||||
void UpdateUpDownButtons();
|
||||
|
||||
std::string GetLanguageStringProperty(const std::unordered_map<Language, std::string>& property, const std::string& fallback);
|
||||
std::string GetLanguageStringProperty(const std::map<Language, std::string>& property, const std::string& fallback);
|
||||
|
||||
protected:
|
||||
Ui::CMainDialog* m_dialog;
|
||||
|
|
Loading…
Reference in New Issue