mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 15:47:46 +00:00
General: Make use of FopenUnique where applicable
Migrates to the hecl Fopen variant that automatically closes its contained file handle if it goes out of scope.
This commit is contained in:
@@ -42,8 +42,8 @@ void SCLY::exportToLayerDirectories(const PAK::Entry& entry, PAKRouter<PAKBridge
|
||||
layerPath.makeDirChain(true);
|
||||
|
||||
if (active) {
|
||||
hecl::ProjectPath activePath(layerPath, "!defaultactive");
|
||||
fclose(hecl::Fopen(activePath.getAbsolutePath().data(), _SYS_STR("wb")));
|
||||
const hecl::ProjectPath activePath(layerPath, "!defaultactive");
|
||||
[[maybe_unused]] const auto fp = hecl::FopenUnique(activePath.getAbsolutePath().data(), _SYS_STR("wb"));
|
||||
}
|
||||
|
||||
hecl::ProjectPath yamlFile(layerPath, _SYS_STR("!objects.yaml"));
|
||||
|
||||
Reference in New Issue
Block a user