This commit is contained in:
Jack Andersen 2016-04-01 17:34:59 -10:00
commit 728141b217
5 changed files with 6 additions and 24 deletions

View File

@ -437,8 +437,7 @@ std::string PAKRouter<BRIDGETYPE>::getBestEntryName(const IDType& entry) const
} }
template <class BRIDGETYPE> template <class BRIDGETYPE>
bool PAKRouter<BRIDGETYPE>::extractResources(const BRIDGETYPE& pakBridge, bool force, bool precedenceSharesOnly, bool PAKRouter<BRIDGETYPE>::extractResources(const BRIDGETYPE& pakBridge, bool force, hecl::BlenderToken& btok,
hecl::BlenderToken& btok,
std::function<void(const hecl::SystemChar*, float)> progress) std::function<void(const hecl::SystemChar*, float)> progress)
{ {
enterPAKBridge(pakBridge); enterPAKBridge(pakBridge);
@ -453,22 +452,6 @@ bool PAKRouter<BRIDGETYPE>::extractResources(const BRIDGETYPE& pakBridge, bool f
if (extractor.weight != w) if (extractor.weight != w)
continue; continue;
#if 0
/* This is used to ensure parallel extracts won't collide files */
if (precedenceSharesOnly)
{
auto sharedSearch = m_sharedEntries.find(item->id);
if (sharedSearch != m_sharedEntries.cend())
{
if (sharedSearch->second.first != reinterpret_cast<intptr_t>(m_curBridgeIdx.get()))
{
++count;
continue;
}
}
}
#endif
std::string bestName = getBestEntryName(*item); std::string bestName = getBestEntryName(*item);
hecl::SystemStringView bestNameView(bestName); hecl::SystemStringView bestNameView(bestName);
float thisFac = ++count / fsz; float thisFac = ++count / fsz;

View File

@ -159,8 +159,7 @@ public:
std::string getBestEntryName(const EntryType& entry) const; std::string getBestEntryName(const EntryType& entry) const;
std::string getBestEntryName(const IDType& entry) const; std::string getBestEntryName(const IDType& entry) const;
bool extractResources(const BRIDGETYPE& pakBridge, bool force, bool precedenceSharesOnly, bool extractResources(const BRIDGETYPE& pakBridge, bool force, hecl::BlenderToken& btok,
hecl::BlenderToken& btok,
std::function<void(const hecl::SystemChar*, float)> progress); std::function<void(const hecl::SystemChar*, float)> progress);
const typename BRIDGETYPE::PAKType::Entry* lookupEntry(const IDType& entry, const typename BRIDGETYPE::PAKType::Entry* lookupEntry(const IDType& entry,

View File

@ -274,7 +274,7 @@ struct SpecMP1 : SpecBase
hecl::SystemString pakName = sysName.sys_str(); hecl::SystemString pakName = sysName.sys_str();
process.addLambdaTransaction([&, pakName](hecl::BlenderToken& btok) process.addLambdaTransaction([&, pakName](hecl::BlenderToken& btok)
{ {
m_pakRouter.extractResources(pak, force, true, btok, m_pakRouter.extractResources(pak, force, btok,
[&](const hecl::SystemChar* substr, float factor) [&](const hecl::SystemChar* substr, float factor)
{ {
std::unique_lock<std::mutex> lk(msgLock); std::unique_lock<std::mutex> lk(msgLock);

View File

@ -256,7 +256,7 @@ struct SpecMP2 : SpecBase
hecl::SystemString pakName = sysName.sys_str(); hecl::SystemString pakName = sysName.sys_str();
process.addLambdaTransaction([&, pakName](hecl::BlenderToken& btok) process.addLambdaTransaction([&, pakName](hecl::BlenderToken& btok)
{ {
m_pakRouter.extractResources(pak, force, true, btok, m_pakRouter.extractResources(pak, force, btok,
[&](const hecl::SystemChar* substr, float factor) [&](const hecl::SystemChar* substr, float factor)
{ {
std::unique_lock<std::mutex> lk(msgLock); std::unique_lock<std::mutex> lk(msgLock);

View File

@ -387,7 +387,7 @@ struct SpecMP3 : SpecBase
hecl::SystemString pakName = sysName.sys_str(); hecl::SystemString pakName = sysName.sys_str();
process.addLambdaTransaction([&, pakName](hecl::BlenderToken& btok) process.addLambdaTransaction([&, pakName](hecl::BlenderToken& btok)
{ {
m_pakRouter.extractResources(pak, force, true, btok, m_pakRouter.extractResources(pak, force, btok,
[&](const hecl::SystemChar* substr, float factor) [&](const hecl::SystemChar* substr, float factor)
{ {
std::unique_lock<std::mutex> lk(msgLock); std::unique_lock<std::mutex> lk(msgLock);
@ -447,7 +447,7 @@ struct SpecMP3 : SpecBase
hecl::SystemString pakName = sysName.sys_str(); hecl::SystemString pakName = sysName.sys_str();
process.addLambdaTransaction([&, pakName](hecl::BlenderToken& btok) process.addLambdaTransaction([&, pakName](hecl::BlenderToken& btok)
{ {
m_fePakRouter.extractResources(pak, force, true, btok, m_fePakRouter.extractResources(pak, force, btok,
[&](const hecl::SystemChar* substr, float factor) [&](const hecl::SystemChar* substr, float factor)
{ {
std::unique_lock<std::mutex> lk(msgLock); std::unique_lock<std::mutex> lk(msgLock);