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.
This commit is contained in:
Lioncash 2018-09-28 02:10:22 -04:00
parent 5df024d5b6
commit 611973db12
2 changed files with 2 additions and 3 deletions

View file

@ -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;
}