From a85bdb81e81526d2732f915b7f9216ed77f32442 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 12 Nov 2018 16:00:10 +0100 Subject: 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. --- include/lib/ArduinoJson/JsonArray.hpp | 12 ++++++------ include/lib/ArduinoJson/Serialization/JsonPrintable.hpp | 12 ++++++------ 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, } // Imports a 1D array - template - bool copyFrom(T (&array)[N]) { - return copyFrom(array, N); + template + bool copyFrom(T (&array)[TN]) { + return copyFrom(array, TN); } // Imports a 1D array @@ -170,9 +170,9 @@ class JsonArray : public Internals::JsonPrintable, } // Exports a 1D array - template - size_t copyTo(T (&array)[N]) const { - return copyTo(array, N); + template + 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 printTo(char (&buffer)[N]) const { - return printTo(buffer, N); + template + size_t printTo(char (&buffer)[TN]) const { + return printTo(buffer, TN); } template @@ -72,9 +72,9 @@ class JsonPrintable { return prettyPrintTo(sb); } - template - size_t prettyPrintTo(char (&buffer)[N]) const { - return prettyPrintTo(buffer, N); + template + size_t prettyPrintTo(char (&buffer)[TN]) const { + return prettyPrintTo(buffer, TN); } template 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 struct IsArray { static const bool value = true; }; -template -struct IsArray { +template +struct IsArray { static const bool value = true; }; } -- cgit v1.2.3