summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorLioncash <mai.iam2048@gmail.com>2024-01-31 13:16:48 -0500
committerLioncash <mai.iam2048@gmail.com>2024-01-31 13:16:50 -0500
commit16d8b6e6b3af87e5d7684bf34ca79b765ff44d33 (patch)
tree322ad34c5b71f84bd3665e02c77e260d252be040 /Source
parentcac66317aa715a3d9fcfe39ccbe5d224ca489637 (diff)
Common/HookableEvent: std::move callback instance in Register()
Potentially avoids reallocations if the capture buffer of the callback is quite large.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Common/HookableEvent.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Common/HookableEvent.h b/Source/Core/Common/HookableEvent.h
index be97a8ab9b..987880de98 100644
--- a/Source/Core/Common/HookableEvent.h
+++ b/Source/Core/Common/HookableEvent.h
@@ -97,7 +97,7 @@ public:
std::lock_guard lock(storage.m_mutex);
DEBUG_LOG_FMT(COMMON, "Registering {} handler at {} event hook", name, EventName.value);
- auto handle = std::make_unique<HookImpl>(callback, std::move(name));
+ auto handle = std::make_unique<HookImpl>(std::move(callback), std::move(name));
storage.m_listeners.push_back(handle.get());
return handle;
}