Use destructor to release file handle

Instead of relying on writing `file.reset()`s
This commit is contained in:
Pengfei
2021-08-02 00:53:03 +08:00
parent aed564fb25
commit 781d76bdab
4 changed files with 19 additions and 15 deletions
+3
View File
@@ -6,6 +6,7 @@
#include <functional>
#include <memory>
#include <mutex>
#include <string>
#include <vector>
#include "common/common_types.h"
@@ -199,7 +200,9 @@ private:
bool is_good{};
Config config;
std::unique_ptr<SDMCDecryptor> decryptor;
std::unique_ptr<CIABuilder> cia_builder;
std::mutex cia_builder_mutex;
// The NCCH used to dump CXIs.
std::unique_ptr<NCCHContainer> dump_cxi_ncch;