FifoPlayer: Use std::move for saving callbacks
This commit is contained in:
parent
46f4f69cfd
commit
677a0903a1
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue