summaryrefslogtreecommitdiff
path: root/src/common/scope_exit.h
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-01-11 13:32:31 -0200
committerGravatar Yuri Kunde Schlesner2015-01-30 11:47:03 -0200
commitfc11aff9559da4725037c21f7a4732f5f009d975 (patch)
treef1034c4fd029f4e4867fe2b5b15352f87dbbd9b7 /src/common/scope_exit.h
parentAdditions to ResultVal to make it more convenient to use. (diff)
downloadyuzu-fc11aff9559da4725037c21f7a4732f5f009d975.tar.gz
yuzu-fc11aff9559da4725037c21f7a4732f5f009d975.tar.xz
yuzu-fc11aff9559da4725037c21f7a4732f5f009d975.zip
Common: Fix SCOPE_EXIT to actually create unique identifiers.
Diffstat (limited to 'src/common/scope_exit.h')
-rw-r--r--src/common/scope_exit.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/scope_exit.h b/src/common/scope_exit.h
index 263beaf0e..77dcbaa22 100644
--- a/src/common/scope_exit.h
+++ b/src/common/scope_exit.h
@@ -4,6 +4,8 @@
4 4
5#pragma once 5#pragma once
6 6
7#include "common/common_funcs.h"
8
7namespace detail { 9namespace detail {
8 template <typename Func> 10 template <typename Func>
9 struct ScopeExitHelper { 11 struct ScopeExitHelper {
@@ -34,4 +36,4 @@ namespace detail {
34 * } 36 * }
35 * \endcode 37 * \endcode
36 */ 38 */
37#define SCOPE_EXIT(body) auto scope_exit_helper_##__LINE__ = detail::ScopeExit([&]() body) 39#define SCOPE_EXIT(body) auto CONCAT2(scope_exit_helper_, __LINE__) = detail::ScopeExit([&]() body)