mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 22:27:43 +00:00
YAML RAII refactor
This commit is contained in:
@@ -12,12 +12,13 @@ static void WriteTag(athena::io::YAMLDocWriter& cacheWriter,
|
||||
{
|
||||
char idStr[9];
|
||||
snprintf(idStr, 9, "%08X", uint32_t(pathTag.id));
|
||||
cacheWriter.enterSubVector(idStr);
|
||||
cacheWriter.writeString(nullptr, pathTag.type.toString().c_str());
|
||||
cacheWriter.writeString(nullptr, path.getAuxInfo().size() ?
|
||||
(path.getRelativePathUTF8() + '|' + path.getAuxInfoUTF8()) :
|
||||
path.getRelativePathUTF8());
|
||||
cacheWriter.leaveSubVector();
|
||||
if (auto v = cacheWriter.enterSubVector(idStr))
|
||||
{
|
||||
cacheWriter.writeString(nullptr, pathTag.type.toString().c_str());
|
||||
cacheWriter.writeString(nullptr, path.getAuxInfo().size() ?
|
||||
(path.getRelativePathUTF8() + '|' + path.getAuxInfoUTF8()) :
|
||||
path.getRelativePathUTF8());
|
||||
}
|
||||
}
|
||||
|
||||
static void WriteNameTag(athena::io::YAMLDocWriter& nameWriter,
|
||||
|
||||
Reference in New Issue
Block a user