mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 21:47:42 +00:00
Async resource build fixes
This commit is contained in:
@@ -19,16 +19,10 @@ CToken CSimplePool::GetObj(const SObjectTag& tag, const CVParamTransfer& paramXf
|
||||
|
||||
if (iter != x4_resources.end())
|
||||
return CToken(iter->second);
|
||||
// TODO: There is some logic missing here, need to figure out what it's doing
|
||||
CObjectReference* ret = new CObjectReference(*this, x30_factory.Build(tag, paramXfer), tag, paramXfer);
|
||||
if (ret->GetObject())
|
||||
{
|
||||
x4_resources.push_back(std::make_pair<SObjectTag, CObjectReference*>((SObjectTag)tag, std::move(ret)));
|
||||
return CToken(ret);
|
||||
}
|
||||
|
||||
delete ret;
|
||||
return CToken();
|
||||
CObjectReference* ret = new CObjectReference(*this, std::unique_ptr<IObj>(), tag, paramXfer);
|
||||
x4_resources.push_back(std::make_pair<SObjectTag, CObjectReference*>((SObjectTag)tag, std::move(ret)));
|
||||
return CToken(ret);
|
||||
}
|
||||
|
||||
CToken CSimplePool::GetObj(const SObjectTag& tag)
|
||||
|
||||
Reference in New Issue
Block a user