diff options
| author | 2021-04-03 22:22:36 -0700 | |
|---|---|---|
| committer | 2021-05-05 16:40:50 -0700 | |
| commit | 7ccbdd4d8d3dea7294d2cac38779cceea9745d52 (patch) | |
| tree | 3106289a5c5a6e4bf50bc09a548c8408aa29fbad /src/core/hle/kernel/object.h | |
| parent | hle: kernel: Refactor IPC interfaces to not use std::shared_ptr. (diff) | |
| download | yuzu-7ccbdd4d8d3dea7294d2cac38779cceea9745d52.tar.gz yuzu-7ccbdd4d8d3dea7294d2cac38779cceea9745d52.tar.xz yuzu-7ccbdd4d8d3dea7294d2cac38779cceea9745d52.zip | |
hle: kernel: Migrate KProcess to KAutoObject.
Diffstat (limited to 'src/core/hle/kernel/object.h')
| -rw-r--r-- | src/core/hle/kernel/object.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/object.h b/src/core/hle/kernel/object.h index 501e58b33..5c14aa46f 100644 --- a/src/core/hle/kernel/object.h +++ b/src/core/hle/kernel/object.h | |||
| @@ -86,9 +86,9 @@ std::shared_ptr<T> SharedFrom(T* raw) { | |||
| 86 | * @return Derived pointer to the object, or `nullptr` if `object` isn't of type T. | 86 | * @return Derived pointer to the object, or `nullptr` if `object` isn't of type T. |
| 87 | */ | 87 | */ |
| 88 | template <typename T> | 88 | template <typename T> |
| 89 | inline std::shared_ptr<T> DynamicObjectCast(std::shared_ptr<Object> object) { | 89 | inline T* DynamicObjectCast(Object* object) { |
| 90 | if (object != nullptr && object->GetHandleType() == T::HANDLE_TYPE) { | 90 | if (object != nullptr && object->GetHandleType() == T::HANDLE_TYPE) { |
| 91 | return std::static_pointer_cast<T>(object); | 91 | return reinterpret_cast<T*>(object); |
| 92 | } | 92 | } |
| 93 | return nullptr; | 93 | return nullptr; |
| 94 | } | 94 | } |