diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-11-12 16:00:10 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-11-12 16:00:10 +0100 |
commit | a85bdb81e81526d2732f915b7f9216ed77f32442 (patch) | |
tree | db4fb609891c180a9a1d78a7f13a298201030baa /include | |
parent | ff5cca72f077dea1a4ae927dff82acbe939b1261 (diff) |
Make ArduinoJson work with msp430.h
msp430.h defines the preprocessor variable "N", which is a frequently
used template parameter name. These two do not go together.
Diffstat (limited to 'include')
-rw-r--r-- | include/lib/ArduinoJson/JsonArray.hpp | 12 | ||||
-rw-r--r-- | include/lib/ArduinoJson/Serialization/JsonPrintable.hpp | 12 | ||||
-rw-r--r-- | include/lib/ArduinoJson/TypeTraits/IsArray.hpp | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/include/lib/ArduinoJson/JsonArray.hpp b/include/lib/ArduinoJson/JsonArray.hpp index 2acd2a1..4431e7a 100644 --- a/include/lib/ArduinoJson/JsonArray.hpp +++ b/include/lib/ArduinoJson/JsonArray.hpp @@ -141,9 +141,9 @@ class JsonArray : public Internals::JsonPrintable<JsonArray>, } // Imports a 1D array - template <typename T, size_t N> - bool copyFrom(T (&array)[N]) { - return copyFrom(array, N); + template <typename T, size_t TN> + bool copyFrom(T (&array)[TN]) { + return copyFrom(array, TN); } // Imports a 1D array @@ -170,9 +170,9 @@ class JsonArray : public Internals::JsonPrintable<JsonArray>, } // Exports a 1D array - template <typename T, size_t N> - size_t copyTo(T (&array)[N]) const { - return copyTo(array, N); + template <typename T, size_t TN> + size_t copyTo(T (&array)[TN]) const { + return copyTo(array, TN); } // Exports a 1D array diff --git a/include/lib/ArduinoJson/Serialization/JsonPrintable.hpp b/include/lib/ArduinoJson/Serialization/JsonPrintable.hpp index 43d413a..e73f8fb 100644 --- a/include/lib/ArduinoJson/Serialization/JsonPrintable.hpp +++ b/include/lib/ArduinoJson/Serialization/JsonPrintable.hpp @@ -49,9 +49,9 @@ class JsonPrintable { return printTo(sb); } - template <size_t N> - size_t printTo(char (&buffer)[N]) const { - return printTo(buffer, N); + template <size_t TN> + size_t printTo(char (&buffer)[TN]) const { + return printTo(buffer, TN); } template <typename TString> @@ -72,9 +72,9 @@ class JsonPrintable { return prettyPrintTo(sb); } - template <size_t N> - size_t prettyPrintTo(char (&buffer)[N]) const { - return prettyPrintTo(buffer, N); + template <size_t TN> + size_t prettyPrintTo(char (&buffer)[TN]) const { + return prettyPrintTo(buffer, TN); } template <typename Print> diff --git a/include/lib/ArduinoJson/TypeTraits/IsArray.hpp b/include/lib/ArduinoJson/TypeTraits/IsArray.hpp index 2599231..da42072 100644 --- a/include/lib/ArduinoJson/TypeTraits/IsArray.hpp +++ b/include/lib/ArduinoJson/TypeTraits/IsArray.hpp @@ -16,8 +16,8 @@ template <typename T> struct IsArray<T[]> { static const bool value = true; }; -template <typename T, size_t N> -struct IsArray<T[N]> { +template <typename T, size_t TN> +struct IsArray<T[TN]> { static const bool value = true; }; } |