forked from eden-emu/eden
hle: kernel: Migrate KProcess to KAutoObject.
This commit is contained in:
parent
5e5933256b
commit
7ccbdd4d8d
14 changed files with 80 additions and 58 deletions
|
@ -86,9 +86,9 @@ std::shared_ptr<T> SharedFrom(T* raw) {
|
|||
* @return Derived pointer to the object, or `nullptr` if `object` isn't of type T.
|
||||
*/
|
||||
template <typename T>
|
||||
inline std::shared_ptr<T> DynamicObjectCast(std::shared_ptr<Object> object) {
|
||||
inline T* DynamicObjectCast(Object* object) {
|
||||
if (object != nullptr && object->GetHandleType() == T::HANDLE_TYPE) {
|
||||
return std::static_pointer_cast<T>(object);
|
||||
return reinterpret_cast<T*>(object);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue