mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 09:47:43 +00:00
CToken fix
Initial CRSC
This commit is contained in:
@@ -233,7 +233,12 @@ public:
|
||||
TToken(T* obj)
|
||||
: CToken(GetIObjObjectFor(std::unique_ptr<T>(obj))) {}
|
||||
TToken& operator=(T* obj) {*this = CToken(GetIObjObjectFor(obj)); return this;}
|
||||
T* GetObj() {return static_cast<TObjOwnerDerivedFromIObj<T>*>(CToken::GetObj())->GetObj();}
|
||||
T* GetObj()
|
||||
{
|
||||
if (CToken::GetObj())
|
||||
return static_cast<TObjOwnerDerivedFromIObj<T>*>(CToken::GetObj())->GetObj();
|
||||
return nullptr;
|
||||
}
|
||||
T* operator->() {return GetObj();}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user