From b6d93b2c778133819aebb2baf6083a1ba0440891 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 29 Nov 2022 08:58:47 -0500 Subject: host1x/syncpoint_manager: Eliminate unnecessary std::function construction We can just pass the function object through, and if it's a valid function, then it will automatically be converted. --- src/video_core/host1x/syncpoint_manager.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/video_core/host1x/syncpoint_manager.h b/src/video_core/host1x/syncpoint_manager.h index feafc926e..847ed20c8 100644 --- a/src/video_core/host1x/syncpoint_manager.h +++ b/src/video_core/host1x/syncpoint_manager.h @@ -36,16 +36,14 @@ public: template ActionHandle RegisterGuestAction(u32 syncpoint_id, u32 expected_value, Func&& action) { - std::function func(action); return RegisterAction(syncpoints_guest[syncpoint_id], guest_action_storage[syncpoint_id], - expected_value, std::move(func)); + expected_value, std::move(action)); } template ActionHandle RegisterHostAction(u32 syncpoint_id, u32 expected_value, Func&& action) { - std::function func(action); return RegisterAction(syncpoints_host[syncpoint_id], host_action_storage[syncpoint_id], - expected_value, std::move(func)); + expected_value, std::move(action)); } void DeregisterGuestAction(u32 syncpoint_id, const ActionHandle& handle); -- cgit v1.2.3