From 677a0903a1eb3cd2f42bb206ad4e041ee9ce3df0 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Mon, 9 Sep 2019 11:38:21 +1200 Subject: [PATCH] FifoPlayer: Use std::move for saving callbacks --- Source/Core/Core/FifoPlayer/FifoPlayer.cpp | 2 +- Source/Core/Core/FifoPlayer/FifoPlayer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/FifoPlayer/FifoPlayer.cpp b/Source/Core/Core/FifoPlayer/FifoPlayer.cpp index 5fcb2acda3..3bf070acb5 100644 --- a/Source/Core/Core/FifoPlayer/FifoPlayer.cpp +++ b/Source/Core/Core/FifoPlayer/FifoPlayer.cpp @@ -170,7 +170,7 @@ std::unique_ptr FifoPlayer::GetCPUCore() void FifoPlayer::SetFileLoadedCallback(CallbackFunc callback) { - m_FileLoadedCb = callback; + m_FileLoadedCb = std::move(callback); // Trigger the callback immediatly if the file is already loaded. if (GetFile() != nullptr) diff --git a/Source/Core/Core/FifoPlayer/FifoPlayer.h b/Source/Core/Core/FifoPlayer/FifoPlayer.h index 1b22eb2849..bb36795d47 100644 --- a/Source/Core/Core/FifoPlayer/FifoPlayer.h +++ b/Source/Core/Core/FifoPlayer/FifoPlayer.h @@ -94,7 +94,7 @@ public: void SetEarlyMemoryUpdates(bool enabled) { m_EarlyMemoryUpdates = enabled; } // Callbacks void SetFileLoadedCallback(CallbackFunc callback); - void SetFrameWrittenCallback(CallbackFunc callback) { m_FrameWrittenCb = callback; } + void SetFrameWrittenCallback(CallbackFunc callback) { m_FrameWrittenCb = std::move(callback); } static FifoPlayer& GetInstance(); bool IsRunningWithFakeVideoInterfaceUpdates() const;