mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-15 08:48:41 -05:00
Common: Fix SCOPE_EXIT to actually create unique identifiers.
This commit is contained in:
@ -4,6 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/common_funcs.h"
|
||||
|
||||
namespace detail {
|
||||
template <typename Func>
|
||||
struct ScopeExitHelper {
|
||||
@ -34,4 +36,4 @@ namespace detail {
|
||||
* }
|
||||
* \endcode
|
||||
*/
|
||||
#define SCOPE_EXIT(body) auto scope_exit_helper_##__LINE__ = detail::ScopeExit([&]() body)
|
||||
#define SCOPE_EXIT(body) auto CONCAT2(scope_exit_helper_, __LINE__) = detail::ScopeExit([&]() body)
|
||||
|
Reference in New Issue
Block a user