FifoPlayer: Use std::move for saving callbacks

This commit is contained in:
Scott Mansell 2019-09-09 11:38:21 +12:00
parent 46f4f69cfd
commit 677a0903a1
2 changed files with 2 additions and 2 deletions

View File

@ -170,7 +170,7 @@ std::unique_ptr<CPUCoreBase> 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)

View File

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