mirror of https://github.com/AxioDL/metaforce.git
Athena YAML refactor
This commit is contained in:
parent
67bb64e7dd
commit
f65e3d23b4
|
@ -1 +1 @@
|
|||
Subproject commit b43c4af3a777d6baf43a6108764648e52f3b7ea6
|
||||
Subproject commit cd9aa3eaf4904f2cbf5510a6f3a7c229f0020e34
|
|
@ -105,10 +105,9 @@ void CVarManager::deserialize(CVar* cvar)
|
|||
filename += _S(".yaml");
|
||||
if (hecl::Stat(filename.c_str(), &st) || !S_ISREG(st.st_mode))
|
||||
return;
|
||||
FILE* f = hecl::Fopen(filename.c_str(), _S("rb"));
|
||||
if (f)
|
||||
container.fromYAMLFile(f);
|
||||
fclose(f);
|
||||
athena::io::FileReader reader(filename);
|
||||
if (reader.isOpen())
|
||||
container.fromYAMLStream(reader);
|
||||
}
|
||||
|
||||
|
||||
|
@ -163,10 +162,9 @@ void CVarManager::serialize()
|
|||
else
|
||||
{
|
||||
filename += _S(".yaml");
|
||||
FILE* f = hecl::Fopen(filename.c_str(), _S("wb"));
|
||||
if (f)
|
||||
container.toYAMLFile(f);
|
||||
fclose(f);
|
||||
athena::io::FileWriter writer(filename);
|
||||
if (writer.isOpen())
|
||||
container.toYAMLStream(writer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue