aboutsummaryrefslogtreecommitdiff
path: root/core/src/Utils/Macros.hpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-06-11 13:35:35 -0700
committerrtk0c <[email protected]>2021-06-11 13:35:35 -0700
commit8f7daa9bd100345d7e23639604c9a3a50ce6448b (patch)
tree4b0c4934f29dfca933e1e955a8af2e61c2719ca1 /core/src/Utils/Macros.hpp
parent222cfec6ad882196d8927f73e30d905daae89556 (diff)
Convert runtime-loaded l10n to string literals chosen at compile time
Diffstat (limited to 'core/src/Utils/Macros.hpp')
-rw-r--r--core/src/Utils/Macros.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/Utils/Macros.hpp b/core/src/Utils/Macros.hpp
index 68b93fb..6958ed1 100644
--- a/core/src/Utils/Macros.hpp
+++ b/core/src/Utils/Macros.hpp
@@ -1,7 +1,12 @@
#pragma once
+#define STRINGIFY_IMPL(text) #text
+#define STRINGIFY(text) STRINGIFY_IMPL(text)
+
#define CONCAT_IMPL(a, b) a##b
#define CONCAT(a, b) CONCAT_IMPL(a, b)
+#define CONCAT_3(a, b, c) CONCAT(a, CONCAT(b, c))
+#define CONCAT_4(a, b, c, d) CONCAT(CONCAT(a, b), CONCAT(c, d))
#define UNIQUE_NAME(prefix) CONCAT(prefix, __COUNTER__)
#define UNIQUE_NAME_LINE(prefix) CONCAT(prefix, __LINE__)