summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2019-04-11 20:01:31 -0400
committerGravatar Lioncash2019-04-11 20:01:33 -0400
commitb569641098a9cb97f5b7f3d41b7e9ad0377f503f (patch)
tree0bc3dbc20471f4b001a893b7dd24504947899f8a
parentMerge pull request #2354 from lioncash/header (diff)
downloadyuzu-b569641098a9cb97f5b7f3d41b7e9ad0377f503f.tar.gz
yuzu-b569641098a9cb97f5b7f3d41b7e9ad0377f503f.tar.xz
yuzu-b569641098a9cb97f5b7f3d41b7e9ad0377f503f.zip
common/scope_exit: Replace std::move with std::forward in ScopeExit()
The template type here is actually a forwarding reference, not an rvalue reference in this case, so it's more appropriate to use std::forward to preserve the value category of the type being moved.
-rw-r--r--src/common/scope_exit.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/scope_exit.h b/src/common/scope_exit.h
index baf1f1c9e..1176a72b1 100644
--- a/src/common/scope_exit.h
+++ b/src/common/scope_exit.h
@@ -20,7 +20,7 @@ struct ScopeExitHelper {
20 20
21template <typename Func> 21template <typename Func>
22ScopeExitHelper<Func> ScopeExit(Func&& func) { 22ScopeExitHelper<Func> ScopeExit(Func&& func) {
23 return ScopeExitHelper<Func>(std::move(func)); 23 return ScopeExitHelper<Func>(std::forward<Func>(func));
24} 24}
25} // namespace detail 25} // namespace detail
26 26