Replace ARDUINOJSON_EXPANDX with variadic macros (#1820)

This commit is contained in:
Benoit Blanchon
2023-02-22 11:24:41 +01:00
parent b2b995edb3
commit 0f8698e655
5 changed files with 21 additions and 27 deletions

View File

@ -23,7 +23,7 @@ inline uint8_t pgm_read_byte(const void* p) {
return *reinterpret_cast<const uint8_t*>(convertFlashToPtr(p));
}
#define ARDUINOJSON_DEFINE_PROGMEM_ARRAY(type, name, value) \
static type const ARDUINOJSON_CONCAT2(name, _progmem)[] = value; \
static type const* name = reinterpret_cast<type const*>( \
#define ARDUINOJSON_DEFINE_PROGMEM_ARRAY(type, name, ...) \
static type const ARDUINOJSON_CONCAT2(name, _progmem)[] = __VA_ARGS__; \
static type const* name = reinterpret_cast<type const*>( \
convertPtrToFlash(ARDUINOJSON_CONCAT2(name, _progmem)));