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);
|
boost::optional<pt::ptree> LoadManifest(const std::string& path);
|
||||||
std::string GetStringProperty(const pt::ptree& manifest, const std::string& key);
|
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)
|
ModData LoadModData(const std::string& path)
|
||||||
{
|
{
|
||||||
|
@ -89,9 +89,9 @@ std::string GetStringProperty(const pt::ptree& manifest, const std::string& key)
|
||||||
return {};
|
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);
|
auto prop = manifest.get_child_optional(key);
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#include "common/language.h"
|
#include "common/language.h"
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <map>
|
||||||
|
|
||||||
struct ModData
|
struct ModData
|
||||||
{
|
{
|
||||||
std::unordered_map<Language, std::string> displayName{};
|
std::map<Language, std::string> displayName{};
|
||||||
std::string author{};
|
std::string author{};
|
||||||
std::string version{};
|
std::string version{};
|
||||||
std::string website{};
|
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.
|
//! 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{};
|
std::string ret{};
|
||||||
const auto language = m_app->GetLanguage();
|
const auto language = m_app->GetLanguage();
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
#include "ui/screen/screen.h"
|
#include "ui/screen/screen.h"
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -79,7 +81,7 @@ protected:
|
||||||
void UpdateApplyButton();
|
void UpdateApplyButton();
|
||||||
void UpdateUpDownButtons();
|
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:
|
protected:
|
||||||
Ui::CMainDialog* m_dialog;
|
Ui::CMainDialog* m_dialog;
|
||||||
|
|
Loading…
Reference in New Issue