Fix string AI assets being truncated if they contain spaces

This commit is contained in:
Celtic Minstrel 2019-11-23 18:49:52 -05:00
parent 63ebe48d64
commit cfd23bd850

View file

@ -58,6 +58,35 @@ public:
};
template<>
class config_value_translator<std::string> {
public:
static std::string cfg_to_value(const config &cfg)
{
return cfg["value"].str();
}
static void cfg_to_value(const config &cfg, std::string &value)
{
value = cfg_to_value(cfg);
}
static void value_to_cfg(const std::string &value, config &cfg)
{
cfg["value"] = value;
}
static config value_to_cfg(const std::string &value)
{
config cfg;
value_to_cfg(value,cfg);
return cfg;
}
};
template<>
class config_value_translator<bool> {
public: