MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / WriteToFile

Method WriteToFile

src/openrct2-ui/interface/Theme.cpp:451–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449 }
450
451 bool UITheme::WriteToFile(const std::string& path) const
452 {
453 auto jsonTheme = ToJson();
454 bool result;
455 try
456 {
457 Json::WriteToFile(path.c_str(), jsonTheme);
458 result = true;
459 }
460 catch (const std::exception& ex)
461 {
462 LOG_ERROR("Unable to save %s: %s", path.c_str(), ex.what());
463 result = false;
464 }
465
466 return result;
467 }
468
469 UITheme* UITheme::FromJson(json_t& jsonObj)
470 {

Callers 3

ThemeSaveFunction · 0.80
ThemeRenameFunction · 0.80
ThemeDuplicateFunction · 0.80

Calls 2

WriteToFileFunction · 0.50
whatMethod · 0.45

Tested by

no test coverage detected