Add stubs for JSON_ARRAY_SIZE, JSON_OBJECT_SIZE, and JSON_STRING_SIZE

This commit is contained in:
Benoit Blanchon committed 2023-08-10 09:54:47 +02:00
1 parent e93fd7657f
commit 1d583f68da
3 files changed
+40 -1

No files matched your search

+20
View File
@@ -24,6 +24,26 @@
#define ARDUINOJSON_NAMESPACE _Pragma ("GCC warning \"ARDUINOJSON_NAMESPACE is deprecated, use ArduinoJson instead\"") ArduinoJson
// DEPRECATED: you don't need to compute the size anymore
#define JSON_ARRAY_SIZE(N) _Pragma ("GCC warning \"JSON_ARRAY_SIZE is deprecated, you don't need to compute the size anymore\"") (ArduinoJson::detail::sizeofArray(N))
// DEPRECATED: you don't need to compute the size anymore
#define JSON_OBJECT_SIZE(N) _Pragma ("GCC warning \"JSON_OBJECT_SIZE is deprecated, you don't need to compute the size anymore\"") (ArduinoJson::detail::sizeofObject(N))
// DEPRECATED: you don't need to compute the size anymore
#define JSON_STRING_SIZE(N) _Pragma ("GCC warning \"JSON_STRING_SIZE is deprecated, you don't need to compute the size anymore\"") (ArduinoJson::detail::sizeofString(N))
#else
// DEPRECATED: you don't need to compute the size anymore
#define JSON_ARRAY_SIZE(N) (ArduinoJson::detail::sizeofArray(N))
// DEPRECATED: you don't need to compute the size anymore
#define JSON_OBJECT_SIZE(N) (ArduinoJson::detail::sizeofObject(N))
// DEPRECATED: you don't need to compute the size anymore
#define JSON_STRING_SIZE(N) (ArduinoJson::detail::sizeofString(N))
#endif
// clang-format on