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)
|
void FifoPlayer::SetFileLoadedCallback(CallbackFunc callback)
|
||||||
{
|
{
|
||||||
m_FileLoadedCb = callback;
|
m_FileLoadedCb = std::move(callback);
|
||||||
|
|
||||||
// Trigger the callback immediatly if the file is already loaded.
|
// Trigger the callback immediatly if the file is already loaded.
|
||||||
if (GetFile() != nullptr)
|
if (GetFile() != nullptr)
|
||||||
|
|
|
@ -94,7 +94,7 @@ public:
|
||||||
void SetEarlyMemoryUpdates(bool enabled) { m_EarlyMemoryUpdates = enabled; }
|
void SetEarlyMemoryUpdates(bool enabled) { m_EarlyMemoryUpdates = enabled; }
|
||||||
// Callbacks
|
// Callbacks
|
||||||
void SetFileLoadedCallback(CallbackFunc callback);
|
void SetFileLoadedCallback(CallbackFunc callback);
|
||||||
void SetFrameWrittenCallback(CallbackFunc callback) { m_FrameWrittenCb = callback; }
|
void SetFrameWrittenCallback(CallbackFunc callback) { m_FrameWrittenCb = std::move(callback); }
|
||||||
static FifoPlayer& GetInstance();
|
static FifoPlayer& GetInstance();
|
||||||
|
|
||||||
bool IsRunningWithFakeVideoInterfaceUpdates() const;
|
bool IsRunningWithFakeVideoInterfaceUpdates() const;
|
||||||
|
|
Loading…
Reference in New Issue