mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-23 18:19:21 +01:00
Merge pull request #4280 from FearlessTobi/port-1412
Port yuzu-emu/yuzu#1412: "kernel/object: Remove unnecessary std::move from DynamicObjectCast()"
This commit is contained in:
commit
9f37b71b4b
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
|
||||||
|
|
||||||
#include <boost/smart_ptr/intrusive_ptr.hpp>
|
#include <boost/smart_ptr/intrusive_ptr.hpp>
|
||||||
|
|
||||||
@ -99,7 +98,7 @@ using SharedPtr = boost::intrusive_ptr<T>;
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
inline SharedPtr<T> DynamicObjectCast(SharedPtr<Object> object) {
|
inline SharedPtr<T> DynamicObjectCast(SharedPtr<Object> object) {
|
||||||
if (object != nullptr && object->GetHandleType() == T::HANDLE_TYPE) {
|
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;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ private:
|
|||||||
template <>
|
template <>
|
||||||
inline SharedPtr<WaitObject> DynamicObjectCast<WaitObject>(SharedPtr<Object> object) {
|
inline SharedPtr<WaitObject> DynamicObjectCast<WaitObject>(SharedPtr<Object> object) {
|
||||||
if (object != nullptr && object->IsWaitable()) {
|
if (object != nullptr && object->IsWaitable()) {
|
||||||
return boost::static_pointer_cast<WaitObject>(std::move(object));
|
return boost::static_pointer_cast<WaitObject>(object);
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user