summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-09-28 02:10:22 -0400
committerLioncash <mathew1800@gmail.com>2018-09-28 02:17:57 -0400
commitf4c24d0832830281f7af08193c10777d49de2ee1 (patch)
treee03d7fc2a2c9a454c5508631bf9ed7877a2c81a1 /src
parent29ff84ea99f0f24fd1c91f187a7894f77c4da416 (diff)
kernel/object: Remove unnecessary std::move from DynamicObjectCast()
boost::static_pointer_cast for boost::intrusive_ptr (what SharedPtr is), takes its parameter by const reference. Given that, it means that this std::move doesn't actually do anything other than obscure what the function's actual behavior is, so we can remove this. To clarify, this would only do something if the parameter was either taking its argument by value, by non-const ref, or by rvalue-reference.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/object.h3
-rw-r--r--src/core/hle/kernel/wait_object.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/core/hle/kernel/object.h b/src/core/hle/kernel/object.h
index b054cbf7d..9eb72315c 100644
--- a/src/core/hle/kernel/object.h
+++ b/src/core/hle/kernel/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;
}
diff --git a/src/core/hle/kernel/wait_object.h b/src/core/hle/kernel/wait_object.h
index 0bd97133c..f4367ee28 100644
--- a/src/core/hle/kernel/wait_object.h
+++ b/src/core/hle/kernel/wait_object.h
@@ -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;
}