Merge bitcoin/bitcoin#24355: util, refactor: Add UNIQUE_NAME helper macro

1633f5ec88 util, refactor: Add UNIQUE_NAME helper macro (Hennadii Stepanov)

Pull request description:

  This PR replaces repetitive code with a helper macro.

ACKs for top commit:
  laanwj:
    Tested ACK 1633f5ec88

Tree-SHA512: 5f04e472c5f3184c0a9df75395377c6744bfb2cd8f95f8427c1c5e20daa7d6a9b29e45424b88391fc6326d365907a750ab50fda534b49d1df80dccf0e18467a4
This commit is contained in:
laanwj
2022-04-13 22:32:45 +02:00
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