diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-02-16 14:51:11 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-02-16 14:59:20 +0200 |
commit | 1633f5ec8846408182cceb60dc88f022635f4002 (patch) | |
tree | f2d67f2417517780af0894e6311c5756f4be988d /src/util/macros.h | |
parent | 1e8aa02ec5cc2819c67ef40a7573c4b23a4c11cc (diff) | |
download | bitcoin-1633f5ec8846408182cceb60dc88f022635f4002.tar.xz |
util, refactor: Add UNIQUE_NAME helper macro
This change replaces repetitive code with a helper macro.
Diffstat (limited to 'src/util/macros.h')
-rw-r--r-- | src/util/macros.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/macros.h b/src/util/macros.h index c9740c8e82..bf6ba665dc 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -8,6 +8,8 @@ #define PASTE(x, y) x ## y #define PASTE2(x, y) PASTE(x, y) +#define UNIQUE_NAME(name) PASTE2(name, __COUNTER__) + /** * Converts the parameter X to a string after macro replacement on X has been performed. * Don't merge these into one macro! |