Removed unneeded FST node member

This commit is contained in:
Jack Andersen 2015-07-17 13:28:41 -10:00
parent bcf67ca8eb
commit f2c1ea6469
2 changed files with 3 additions and 5 deletions

View File

@ -86,7 +86,6 @@ public:
const IPartition& m_parent;
Kind m_kind;
std::unique_ptr<IFileIO> 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;

View File

@ -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<IPartReadStream> rs = beginReadStream();
std::unique_ptr<IFileIO::IWriteStream> ws = m_hddFile->beginWriteStream();
std::unique_ptr<IFileIO::IWriteStream> ws = NewFileIO(path)->beginWriteStream();
ws->copyFromDisc(*rs.get(), m_discLength);
}
}