From 8f7daa9bd100345d7e23639604c9a3a50ce6448b Mon Sep 17 00:00:00 2001 From: rtk0c Date: Fri, 11 Jun 2021 13:35:35 -0700 Subject: Convert runtime-loaded l10n to string literals chosen at compile time --- core/src/Utils/Macros.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/src/Utils/Macros.hpp') 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__) -- cgit v1.2.3-70-g09d2