Browse Source
Merge pull request #1412 from lioncash/move
kernel/object: Remove unnecessary std::move from DynamicObjectCast()
pull/15/merge
bunnei
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
3 deletions
-
src/core/hle/kernel/object.h
-
src/core/hle/kernel/wait_object.h
|
|
|
@ -6,7 +6,6 @@ |
|
|
|
|
|
|
|
#include <atomic> |
|
|
|
#include <string> |
|
|
|
#include <utility> |
|
|
|
|
|
|
|
#include <boost/smart_ptr/intrusive_ptr.hpp> |
|
|
|
|
|
|
|
@ -97,7 +96,7 @@ using SharedPtr = boost::intrusive_ptr<T>; |
|
|
|
template <typename T> |
|
|
|
inline SharedPtr<T> DynamicObjectCast(SharedPtr<Object> object) { |
|
|
|
if (object != nullptr && object->GetHandleType() == T::HANDLE_TYPE) { |
|
|
|
return boost::static_pointer_cast<T>(std::move(object)); |
|
|
|
return boost::static_pointer_cast<T>(object); |
|
|
|
} |
|
|
|
return nullptr; |
|
|
|
} |
|
|
|
|
|
|
|
@ -69,7 +69,7 @@ private: |
|
|
|
template <> |
|
|
|
inline SharedPtr<WaitObject> DynamicObjectCast<WaitObject>(SharedPtr<Object> object) { |
|
|
|
if (object != nullptr && object->IsWaitable()) { |
|
|
|
return boost::static_pointer_cast<WaitObject>(std::move(object)); |
|
|
|
return boost::static_pointer_cast<WaitObject>(object); |
|
|
|
} |
|
|
|
return nullptr; |
|
|
|
} |
|
|
|
|