util, refactor: Add UNIQUE_NAME helper macro

This change replaces repetitive code with a helper macro.
This commit is contained in:
Hennadii Stepanov
2022-02-16 14:51:11 +02:00
parent 1e8aa02ec5
commit 1633f5ec88
5 changed files with 11 additions and 8 deletions

View File

@@ -36,6 +36,6 @@ public:
~DebugLogHelper() { check_found(); }
};
#define ASSERT_DEBUG_LOG(message) DebugLogHelper PASTE2(debugloghelper, __COUNTER__)(message)
#define ASSERT_DEBUG_LOG(message) DebugLogHelper UNIQUE_NAME(debugloghelper)(message)
#endif // BITCOIN_TEST_UTIL_LOGGING_H