mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Move definitions of JSON_ARRAY_SIZE() and JSON_OBJECT_SIZE()
				
					
				
			This commit is contained in:
		| @@ -10,11 +10,6 @@ | |||||||
| #include <ArduinoJson/Variant/VariantAttorney.hpp> | #include <ArduinoJson/Variant/VariantAttorney.hpp> | ||||||
| #include <ArduinoJson/Variant/VariantData.hpp> | #include <ArduinoJson/Variant/VariantData.hpp> | ||||||
|  |  | ||||||
| // 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 { | namespace ARDUINOJSON_NAMESPACE { | ||||||
|  |  | ||||||
| class ObjectRef; | class ObjectRef; | ||||||
|   | |||||||
| @@ -14,6 +14,16 @@ | |||||||
|  |  | ||||||
| #define JSON_STRING_SIZE(SIZE) (SIZE + 1) | #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 { | namespace ARDUINOJSON_NAMESPACE { | ||||||
|  |  | ||||||
| // _begin                                   _end | // _begin                                   _end | ||||||
|   | |||||||
| @@ -8,11 +8,6 @@ | |||||||
| #include <ArduinoJson/Object/ObjectFunctions.hpp> | #include <ArduinoJson/Object/ObjectFunctions.hpp> | ||||||
| #include <ArduinoJson/Object/ObjectIterator.hpp> | #include <ArduinoJson/Object/ObjectIterator.hpp> | ||||||
|  |  | ||||||
| // 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 { | namespace ARDUINOJSON_NAMESPACE { | ||||||
|  |  | ||||||
| class ArrayRef; | class ArrayRef; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user