GraphicsModAsset: Reduce object churn a little

This commit is contained in:
Lioncash 2024-01-24 22:47:22 -05:00
parent 2253d9a95d
commit 0385b40bd8
1 changed files with 3 additions and 3 deletions

View File

@ -8,14 +8,14 @@
void GraphicsModAssetConfig::SerializeToConfig(picojson::object& json_obj) const
{
json_obj["name"] = picojson::value{m_asset_id};
json_obj.emplace("name", m_asset_id);
picojson::object serialized_data;
for (const auto& [name, path] : m_map)
{
serialized_data[name] = picojson::value{PathToString(path)};
serialized_data.emplace(name, PathToString(path));
}
json_obj["data"] = picojson::value{serialized_data};
json_obj.emplace("data", std::move(serialized_data));
}
bool GraphicsModAssetConfig::DeserializeFromConfig(const picojson::object& obj)