in EMSESP_DEBUG only use EN language to save space

This commit is contained in:
Proddy
2023-02-05 10:58:32 +01:00
parent cf53c56ac7
commit 63e734b0aa
2 changed files with 12 additions and 0 deletions

View File

@@ -46,7 +46,14 @@ using string_vector = std::vector<const char *>;
#define F_(string_name) (__pstr__##string_name)
#define FL_(list_name) (__pstr__L_##list_name)
#ifdef EMSESP_DEBUG
// In debug mode just take one language (en) to save Flash space
#define MAKE_PSTR_LIST(list_name, en, ...) static const char * const __pstr__L_##list_name[] = {en, nullptr};
#else
#define MAKE_PSTR_LIST(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
#endif
#define MAKE_PSTR_ENUM(enum_name, ...) static const char * const * __pstr__L_##enum_name[] = {__VA_ARGS__, nullptr};
// clang-format on