From f2c1ea646900f7fcca12b45878923014816295e9 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 17 Jul 2015 13:28:41 -1000 Subject: [PATCH] Removed unneeded FST node member --- include/NOD/DiscBase.hpp | 3 +-- lib/DiscBase.cpp | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/NOD/DiscBase.hpp b/include/NOD/DiscBase.hpp index 34cd843..2bbc73b 100644 --- a/include/NOD/DiscBase.hpp +++ b/include/NOD/DiscBase.hpp @@ -86,7 +86,6 @@ public: const IPartition& m_parent; Kind m_kind; - std::unique_ptr m_hddFile; uint64_t m_discOffset; uint64_t m_discLength; std::string m_name; @@ -164,7 +163,7 @@ public: return end(); } - void extractToDirectory(const SystemString& basePath, bool force=false); + void extractToDirectory(const SystemString& basePath, bool force=false) const; }; protected: uint64_t m_dolOff; diff --git a/lib/DiscBase.cpp b/lib/DiscBase.cpp index 0ae76f5..6eb6dbb 100644 --- a/lib/DiscBase.cpp +++ b/lib/DiscBase.cpp @@ -57,7 +57,7 @@ void DiscBase::IPartition::parseDOL(IPartReadStream& s) m_dolSz = dolSize; } -void DiscBase::IPartition::Node::extractToDirectory(const SystemString& basePath, bool force) +void DiscBase::IPartition::Node::extractToDirectory(const SystemString& basePath, bool force) const { SystemStringView nameView(getName()); SystemString path = basePath + _S("/") + nameView.sys_str(); @@ -76,9 +76,8 @@ void DiscBase::IPartition::Node::extractToDirectory(const SystemString& basePath Sstat theStat; if (force || Stat(path.c_str(), &theStat)) { - m_hddFile = NewFileIO(path); std::unique_ptr rs = beginReadStream(); - std::unique_ptr ws = m_hddFile->beginWriteStream(); + std::unique_ptr ws = NewFileIO(path)->beginWriteStream(); ws->copyFromDisc(*rs.get(), m_discLength); } }