diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-05-12 09:26:23 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-05-12 09:26:23 +0200 |
commit | 789986a05bd03935f1c344dc03ffaff36c8e7cdb (patch) | |
tree | 65b308c6705110aeb7853a10e44e0e6d7de6ed49 /include/lib/ArduinoJson/Array/Utilities.hpp | |
parent | 39895a677e5d370824e702cfe90ebc67737b8482 (diff) |
Make ArduinoJson work with MSP430 headers
Diffstat (limited to 'include/lib/ArduinoJson/Array/Utilities.hpp')
-rw-r--r-- | include/lib/ArduinoJson/Array/Utilities.hpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/lib/ArduinoJson/Array/Utilities.hpp b/include/lib/ArduinoJson/Array/Utilities.hpp index 619b91d..d2cf4bf 100644 --- a/include/lib/ArduinoJson/Array/Utilities.hpp +++ b/include/lib/ArduinoJson/Array/Utilities.hpp @@ -4,24 +4,24 @@ #pragma once -#include <ArduinoJson/Array/ArrayRef.hpp> -#include <ArduinoJson/Document/JsonDocument.hpp> -#include <ArduinoJson/Variant/Visitor.hpp> +#include "lib/ArduinoJson/Array/ArrayRef.hpp" +#include "lib/ArduinoJson/Document/JsonDocument.hpp" +#include "lib/ArduinoJson/Variant/Visitor.hpp" namespace ARDUINOJSON_NAMESPACE { // Copy a 1D array to a JsonArray -template <typename T, size_t N, typename TDestination> +template <typename T, size_t TN, typename TDestination> inline typename enable_if<!is_array<T>::value && !is_base_of<JsonDocument, TDestination>::value, bool>::type -copyArray(T (&src)[N], const TDestination& dst) { - return copyArray(src, N, dst); +copyArray(T (&src)[TN], const TDestination& dst) { + return copyArray(src, TN, dst); } // Copy a 1D array to a JsonDocument -template <typename T, size_t N> -inline bool copyArray(T (&src)[N], JsonDocument& dst) { +template <typename T, size_t TN> +inline bool copyArray(T (&src)[TN], JsonDocument& dst) { return copyArray(src, dst.to<ArrayRef>()); } @@ -109,10 +109,10 @@ class ArrayCopier2D : public Visitor<void> { }; // Copy a JsonArray to a 1D array -template <typename TSource, typename T, size_t N> +template <typename TSource, typename T, size_t TN> inline typename enable_if<!is_array<T>::value, size_t>::type copyArray( - const TSource& src, T (&dst)[N]) { - return copyArray(src, dst, N); + const TSource& src, T (&dst)[TN]) { + return copyArray(src, dst, TN); } // Copy a JsonArray to a 1D array |