diff --git a/src/ArduinoJson/Array/ArrayRef.hpp b/src/ArduinoJson/Array/ArrayRef.hpp index e25a6bd5..dc94f634 100644 --- a/src/ArduinoJson/Array/ArrayRef.hpp +++ b/src/ArduinoJson/Array/ArrayRef.hpp @@ -10,11 +10,6 @@ #include #include -// Returns the size (in bytes) of an array with n elements. -// Can be very handy to determine the size of a StaticMemoryPool. -#define JSON_ARRAY_SIZE(NUMBER_OF_ELEMENTS) \ - ((NUMBER_OF_ELEMENTS) * sizeof(ARDUINOJSON_NAMESPACE::VariantSlot)) - namespace ARDUINOJSON_NAMESPACE { class ObjectRef; diff --git a/src/ArduinoJson/Memory/MemoryPool.hpp b/src/ArduinoJson/Memory/MemoryPool.hpp index e150d01c..fe09a9f3 100644 --- a/src/ArduinoJson/Memory/MemoryPool.hpp +++ b/src/ArduinoJson/Memory/MemoryPool.hpp @@ -14,6 +14,16 @@ #define JSON_STRING_SIZE(SIZE) (SIZE + 1) +// Returns the size (in bytes) of an array with n elements. +// Can be very handy to determine the size of a StaticMemoryPool. +#define JSON_ARRAY_SIZE(NUMBER_OF_ELEMENTS) \ + ((NUMBER_OF_ELEMENTS) * sizeof(ARDUINOJSON_NAMESPACE::VariantSlot)) + +// Returns the size (in bytes) of an object with n elements. +// Can be very handy to determine the size of a StaticMemoryPool. +#define JSON_OBJECT_SIZE(NUMBER_OF_ELEMENTS) \ + ((NUMBER_OF_ELEMENTS) * sizeof(ARDUINOJSON_NAMESPACE::VariantSlot)) + namespace ARDUINOJSON_NAMESPACE { // _begin _end diff --git a/src/ArduinoJson/Object/ObjectRef.hpp b/src/ArduinoJson/Object/ObjectRef.hpp index 59f94c4f..69f469db 100644 --- a/src/ArduinoJson/Object/ObjectRef.hpp +++ b/src/ArduinoJson/Object/ObjectRef.hpp @@ -8,11 +8,6 @@ #include #include -// Returns the size (in bytes) of an object with n elements. -// Can be very handy to determine the size of a StaticMemoryPool. -#define JSON_OBJECT_SIZE(NUMBER_OF_ELEMENTS) \ - ((NUMBER_OF_ELEMENTS) * sizeof(ARDUINOJSON_NAMESPACE::VariantSlot)) - namespace ARDUINOJSON_NAMESPACE { class ArrayRef;