mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Use absolute instead of relative includes (fixes #1072)
This commit is contained in:
		| @@ -1,6 +1,11 @@ | ||||
| ArduinoJson: change log | ||||
| ======================= | ||||
|  | ||||
| HEAD | ||||
| ---- | ||||
|  | ||||
| * Use absolute instead of relative includes (issue #1072) | ||||
|  | ||||
| v6.11.5 (2019-08-23) | ||||
| ------- | ||||
|  | ||||
|   | ||||
| @@ -1,8 +1,14 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| set -e | ||||
|  | ||||
| TAG=$(git describe) | ||||
| RE_INCLUDE='^#include[[:space:]]*["<](.*)[">]' | ||||
| RE_RELATIVE_INCLUDE='^#include[[:space:]]*"(.*)"' | ||||
| RE_ABSOLUTE_INCLUDE='^#include[[:space:]]*<(ArduinoJson/.*)>' | ||||
| RE_SYSTEM_INCLUDE='^#include[[:space:]]*<(.*)>' | ||||
| RE_EMPTY='^(#pragma[[:space:]]+once)?[[:space:]]*(//.*)?$' | ||||
| SRC_DIRECTORY="$(realpath "$(dirname $0)/../src")" | ||||
|  | ||||
|  | ||||
| declare -A INCLUDED | ||||
|  | ||||
| @@ -12,23 +18,33 @@ process() | ||||
| 	local FOLDER=$(dirname $1) | ||||
| 	local SHOW_COMMENT=$2 | ||||
| 	while IFS= read -r LINE; do | ||||
| 		if [[ $LINE =~ $RE_INCLUDE ]]; then | ||||
| 		if [[ $LINE =~ $RE_ABSOLUTE_INCLUDE ]]; then | ||||
| 			local CHILD=${BASH_REMATCH[1]} | ||||
| 			local CHILD_PATH | ||||
| 			CHILD_PATH=$(realpath "$SRC_DIRECTORY/$CHILD") | ||||
| 			echo "$PARENT -> $CHILD" >&2 | ||||
| 			if [[ ! ${INCLUDED[$CHILD_PATH]} ]]; then | ||||
| 				INCLUDED[$CHILD_PATH]=true | ||||
| 				process "$CHILD" false | ||||
| 			fi | ||||
| 		elif [[ $LINE =~ $RE_RELATIVE_INCLUDE ]]; then | ||||
| 			local CHILD=${BASH_REMATCH[1]} | ||||
| 			pushd "$FOLDER" > /dev/null | ||||
| 			if [[ -e $CHILD ]]; then | ||||
| 				local CHILD_PATH=$(realpath $CHILD) | ||||
| 				if [[ ! ${INCLUDED[$CHILD_PATH]} ]]; then | ||||
| 					#echo "// $PARENT -> $CHILD" | ||||
| 					INCLUDED[$CHILD_PATH]=true | ||||
| 					process "$CHILD" false | ||||
| 				fi | ||||
| 			else | ||||
| 				if [[ ! ${INCLUDED[$CHILD]} ]]; then | ||||
| 					echo "$LINE" | ||||
| 					INCLUDED[$CHILD]=true | ||||
| 				fi | ||||
| 			local CHILD_PATH | ||||
| 			CHILD_PATH=$(realpath "$CHILD") | ||||
| 			echo "$PARENT -> $CHILD" >&2 | ||||
| 			if [[ ! ${INCLUDED[$CHILD_PATH]} ]]; then | ||||
| 				INCLUDED[$CHILD_PATH]=true | ||||
| 				process "$CHILD" false | ||||
| 			fi | ||||
| 			popd > /dev/null | ||||
| 		elif [[ $LINE =~ $RE_SYSTEM_INCLUDE ]]; then | ||||
| 			local CHILD=${BASH_REMATCH[1]} | ||||
| 			echo "$PARENT -> <$CHILD>" >&2 | ||||
| 			if [[ ! ${INCLUDED[$CHILD]} ]]; then | ||||
| 				echo "#include <$CHILD>" | ||||
| 				INCLUDED[$CHILD]=true | ||||
| 			fi | ||||
| 		elif [[ "${SHOW_COMMENT}" = "true" ]] ; then | ||||
| 			echo "$LINE" | ||||
| 		elif [[ ! $LINE =~ $RE_EMPTY ]]; then | ||||
| @@ -37,17 +53,29 @@ process() | ||||
| 	done < $PARENT | ||||
| } | ||||
|  | ||||
| simplify_namespaces() { | ||||
| 	perl -p0i -e 's|\}  // namespace ARDUINOJSON_NAMESPACE\r?\nnamespace ARDUINOJSON_NAMESPACE \{\r?\n||igs' "$1" | ||||
| } | ||||
|  | ||||
| cd $(dirname $0)/../ | ||||
| INCLUDED=() | ||||
| process src/ArduinoJson.h true > ../ArduinoJson-$TAG.h | ||||
| simplify_namespaces ../ArduinoJson-$TAG.h | ||||
| g++ -x c++ -c -o ../smoketest.o - <<END | ||||
| #include "../ArduinoJson-$TAG.h" | ||||
| int main() {} | ||||
| int main() { | ||||
| 	StaticJsonDocument<300> doc; | ||||
| 	deserializeJson(doc, "{}"); | ||||
| } | ||||
| END | ||||
|  | ||||
| INCLUDED=() | ||||
| process src/ArduinoJson.hpp true > ../ArduinoJson-$TAG.hpp | ||||
| simplify_namespaces ../ArduinoJson-$TAG.hpp | ||||
| g++ -x c++ -c -o ../smoketest.o - <<END | ||||
| #include "../ArduinoJson-$TAG.hpp" | ||||
| int main() {} | ||||
| END | ||||
| int main() { | ||||
| 	ArduinoJson::StaticJsonDocument<300> doc; | ||||
| 	ArduinoJson::deserializeJson(doc, "{}"); | ||||
| } | ||||
| END | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Collection/CollectionData.hpp" | ||||
| #include <ArduinoJson/Collection/CollectionData.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Object/ObjectRef.hpp" | ||||
| #include "ArrayRef.hpp" | ||||
| #include <ArduinoJson/Array/ArrayRef.hpp> | ||||
| #include <ArduinoJson/Object/ObjectRef.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Variant/SlotFunctions.hpp" | ||||
| #include "../Variant/VariantRef.hpp" | ||||
| #include <ArduinoJson/Variant/SlotFunctions.hpp> | ||||
| #include <ArduinoJson/Variant/VariantRef.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,9 +4,9 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Variant/VariantData.hpp" | ||||
| #include "ArrayFunctions.hpp" | ||||
| #include "ArrayIterator.hpp" | ||||
| #include <ArduinoJson/Array/ArrayFunctions.hpp> | ||||
| #include <ArduinoJson/Array/ArrayIterator.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. | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Polyfills/attributes.hpp" | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include <ArduinoJson/Polyfills/attributes.hpp> | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
| // Forward declarations. | ||||
|   | ||||
| @@ -4,8 +4,9 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Configuration.hpp" | ||||
| #include "../Operators/VariantOperators.hpp" | ||||
| #include <ArduinoJson/Configuration.hpp> | ||||
| #include <ArduinoJson/Operators/VariantOperators.hpp> | ||||
| #include <ArduinoJson/Variant/VariantTo.hpp> | ||||
|  | ||||
| #ifdef _MSC_VER | ||||
| #pragma warning(push) | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "ArrayRef.hpp" | ||||
| #include <ArduinoJson/Array/ArrayRef.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,6 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include <stddef.h>  // size_t | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
| class MemoryPool; | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Variant/VariantData.hpp" | ||||
| #include "CollectionData.hpp" | ||||
| #include <ArduinoJson/Collection/CollectionData.hpp> | ||||
| #include <ArduinoJson/Variant/VariantData.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Configuration.hpp" | ||||
| #include <ArduinoJson/Configuration.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,14 +4,14 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../StringStorage/StringStorage.hpp" | ||||
| #include "ArduinoStreamReader.hpp" | ||||
| #include "CharPointerReader.hpp" | ||||
| #include "DeserializationError.hpp" | ||||
| #include "FlashStringReader.hpp" | ||||
| #include "IteratorReader.hpp" | ||||
| #include "NestingLimit.hpp" | ||||
| #include "StdStreamReader.hpp" | ||||
| #include <ArduinoJson/Deserialization/ArduinoStreamReader.hpp> | ||||
| #include <ArduinoJson/Deserialization/CharPointerReader.hpp> | ||||
| #include <ArduinoJson/Deserialization/DeserializationError.hpp> | ||||
| #include <ArduinoJson/Deserialization/FlashStringReader.hpp> | ||||
| #include <ArduinoJson/Deserialization/IteratorReader.hpp> | ||||
| #include <ArduinoJson/Deserialization/NestingLimit.hpp> | ||||
| #include <ArduinoJson/Deserialization/StdStreamReader.hpp> | ||||
| #include <ArduinoJson/StringStorage/StringStorage.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "JsonDocument.hpp" | ||||
| #include <ArduinoJson/Document/JsonDocument.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "BasicJsonDocument.hpp" | ||||
| #include <ArduinoJson/Document/BasicJsonDocument.hpp> | ||||
|  | ||||
| #include <stdlib.h>  // malloc, free | ||||
|  | ||||
|   | ||||
| @@ -4,13 +4,12 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Memory/MemoryPool.hpp" | ||||
| #include "../Object/ObjectRef.hpp" | ||||
| #include "../Variant/VariantRef.hpp" | ||||
| #include "../Variant/VariantTo.hpp" | ||||
|  | ||||
| #include "../Array/ElementProxy.hpp" | ||||
| #include "../Object/MemberProxy.hpp" | ||||
| #include <ArduinoJson/Array/ElementProxy.hpp> | ||||
| #include <ArduinoJson/Memory/MemoryPool.hpp> | ||||
| #include <ArduinoJson/Object/MemberProxy.hpp> | ||||
| #include <ArduinoJson/Object/ObjectRef.hpp> | ||||
| #include <ArduinoJson/Variant/VariantRef.hpp> | ||||
| #include <ArduinoJson/Variant/VariantTo.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "JsonDocument.hpp" | ||||
| #include <ArduinoJson/Document/JsonDocument.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,13 +4,13 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Deserialization/deserialize.hpp" | ||||
| #include "../Memory/MemoryPool.hpp" | ||||
| #include "../Numbers/parseNumber.hpp" | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include "../Variant/VariantData.hpp" | ||||
| #include "EscapeSequence.hpp" | ||||
| #include "Utf8.hpp" | ||||
| #include <ArduinoJson/Deserialization/deserialize.hpp> | ||||
| #include <ArduinoJson/Json/EscapeSequence.hpp> | ||||
| #include <ArduinoJson/Json/Utf8.hpp> | ||||
| #include <ArduinoJson/Memory/MemoryPool.hpp> | ||||
| #include <ArduinoJson/Numbers/parseNumber.hpp> | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
| #include <ArduinoJson/Variant/VariantData.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,10 +4,10 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Misc/Visitable.hpp" | ||||
| #include "../Serialization/measure.hpp" | ||||
| #include "../Serialization/serialize.hpp" | ||||
| #include "TextFormatter.hpp" | ||||
| #include <ArduinoJson/Json/TextFormatter.hpp> | ||||
| #include <ArduinoJson/Misc/Visitable.hpp> | ||||
| #include <ArduinoJson/Serialization/measure.hpp> | ||||
| #include <ArduinoJson/Serialization/serialize.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,10 +4,10 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Configuration.hpp" | ||||
| #include "../Serialization/measure.hpp" | ||||
| #include "../Serialization/serialize.hpp" | ||||
| #include "JsonSerializer.hpp" | ||||
| #include <ArduinoJson/Configuration.hpp> | ||||
| #include <ArduinoJson/Json/JsonSerializer.hpp> | ||||
| #include <ArduinoJson/Serialization/measure.hpp> | ||||
| #include <ArduinoJson/Serialization/serialize.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -6,10 +6,11 @@ | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include <string.h>  // for strlen | ||||
| #include "../Numbers/FloatParts.hpp" | ||||
| #include "../Numbers/Integer.hpp" | ||||
| #include "../Polyfills/attributes.hpp" | ||||
| #include "EscapeSequence.hpp" | ||||
|  | ||||
| #include <ArduinoJson/Json/EscapeSequence.hpp> | ||||
| #include <ArduinoJson/Numbers/FloatParts.hpp> | ||||
| #include <ArduinoJson/Numbers/Integer.hpp> | ||||
| #include <ArduinoJson/Polyfills/attributes.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,12 +4,11 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Polyfills/assert.hpp" | ||||
| #include "../Polyfills/mpl/max.hpp" | ||||
| #include "../Variant/VariantSlot.hpp" | ||||
| #include "Alignment.hpp" | ||||
| #include "MemoryPool.hpp" | ||||
| #include "StringSlot.hpp" | ||||
| #include <ArduinoJson/Memory/Alignment.hpp> | ||||
| #include <ArduinoJson/Memory/StringSlot.hpp> | ||||
| #include <ArduinoJson/Polyfills/assert.hpp> | ||||
| #include <ArduinoJson/Polyfills/mpl/max.hpp> | ||||
| #include <ArduinoJson/Variant/VariantSlot.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "MemoryPool.hpp" | ||||
| #include <ArduinoJson/Memory/MemoryPool.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -5,7 +5,8 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stddef.h>  // for size_t | ||||
| #include "../Configuration.hpp" | ||||
|  | ||||
| #include <ArduinoJson/Configuration.hpp> | ||||
|  | ||||
| #define JSON_STRING_SIZE(SIZE) (SIZE) | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Strings/StringAdapters.hpp" | ||||
| #include <ArduinoJson/Strings/StringAdapters.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,12 +4,12 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Deserialization/deserialize.hpp" | ||||
| #include "../Memory/MemoryPool.hpp" | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include "../Variant/VariantData.hpp" | ||||
| #include "endianess.hpp" | ||||
| #include "ieee754.hpp" | ||||
| #include <ArduinoJson/Deserialization/deserialize.hpp> | ||||
| #include <ArduinoJson/Memory/MemoryPool.hpp> | ||||
| #include <ArduinoJson/MsgPack/endianess.hpp> | ||||
| #include <ArduinoJson/MsgPack/ieee754.hpp> | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
| #include <ArduinoJson/Variant/VariantData.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,11 +4,11 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include "../Serialization/measure.hpp" | ||||
| #include "../Serialization/serialize.hpp" | ||||
| #include "../Variant/VariantData.hpp" | ||||
| #include "endianess.hpp" | ||||
| #include <ArduinoJson/MsgPack/endianess.hpp> | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
| #include <ArduinoJson/Serialization/measure.hpp> | ||||
| #include <ArduinoJson/Serialization/serialize.hpp> | ||||
| #include <ArduinoJson/Variant/VariantData.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include "../Polyfills/utility.hpp" | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
| #include <ArduinoJson/Polyfills/utility.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,9 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "version.hpp" | ||||
|  | ||||
| #include "Configuration.hpp" | ||||
| #include <ArduinoJson/Configuration.hpp> | ||||
| #include <ArduinoJson/version.hpp> | ||||
|  | ||||
| #define ARDUINOJSON_DO_CONCAT(A, B) A##B | ||||
| #define ARDUINOJSON_CONCAT2(A, B) ARDUINOJSON_DO_CONCAT(A, B) | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Configuration.hpp" | ||||
| #include <ArduinoJson/Configuration.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,9 +4,9 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Configuration.hpp" | ||||
| #include "../Polyfills/math.hpp" | ||||
| #include "./FloatTraits.hpp" | ||||
| #include <ArduinoJson/Configuration.hpp> | ||||
| #include <ArduinoJson/Numbers/FloatTraits.hpp> | ||||
| #include <ArduinoJson/Polyfills/math.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -6,9 +6,10 @@ | ||||
|  | ||||
| #include <stddef.h>  // for size_t | ||||
| #include <stdint.h> | ||||
| #include "../Configuration.hpp" | ||||
| #include "../Polyfills/alias_cast.hpp" | ||||
| #include "../Polyfills/math.hpp" | ||||
|  | ||||
| #include <ArduinoJson/Configuration.hpp> | ||||
| #include <ArduinoJson/Polyfills/alias_cast.hpp> | ||||
| #include <ArduinoJson/Polyfills/math.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Configuration.hpp" | ||||
| #include <ArduinoJson/Configuration.hpp> | ||||
|  | ||||
| #include <stdint.h>  // int64_t | ||||
|  | ||||
|   | ||||
| @@ -14,10 +14,10 @@ | ||||
| #pragma GCC diagnostic ignored "-Wconversion" | ||||
| #endif | ||||
|  | ||||
| #include "../Polyfills/limits.hpp" | ||||
| #include "Float.hpp" | ||||
| #include "FloatTraits.hpp" | ||||
| #include "Integer.hpp" | ||||
| #include <ArduinoJson/Numbers/Float.hpp> | ||||
| #include <ArduinoJson/Numbers/FloatTraits.hpp> | ||||
| #include <ArduinoJson/Numbers/Integer.hpp> | ||||
| #include <ArduinoJson/Polyfills/limits.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "convertNumber.hpp" | ||||
| #include "parseNumber.hpp" | ||||
| #include <ArduinoJson/Numbers/convertNumber.hpp> | ||||
| #include <ArduinoJson/Numbers/parseNumber.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,9 +4,9 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include "convertNumber.hpp" | ||||
| #include "parseNumber.hpp" | ||||
| #include <ArduinoJson/Numbers/convertNumber.hpp> | ||||
| #include <ArduinoJson/Numbers/parseNumber.hpp> | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
| template <typename T> | ||||
|   | ||||
| @@ -4,13 +4,13 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Polyfills/assert.hpp" | ||||
| #include "../Polyfills/ctype.hpp" | ||||
| #include "../Polyfills/math.hpp" | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include "../Variant/VariantContent.hpp" | ||||
| #include "FloatTraits.hpp" | ||||
| #include "convertNumber.hpp" | ||||
| #include <ArduinoJson/Numbers/FloatTraits.hpp> | ||||
| #include <ArduinoJson/Numbers/convertNumber.hpp> | ||||
| #include <ArduinoJson/Polyfills/assert.hpp> | ||||
| #include <ArduinoJson/Polyfills/ctype.hpp> | ||||
| #include <ArduinoJson/Polyfills/math.hpp> | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
| #include <ArduinoJson/Variant/VariantContent.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,9 +4,9 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Configuration.hpp" | ||||
| #include "../Operators/VariantOperators.hpp" | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include <ArduinoJson/Configuration.hpp> | ||||
| #include <ArduinoJson/Operators/VariantOperators.hpp> | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
|  | ||||
| #ifdef _MSC_VER | ||||
| #pragma warning(push) | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Collection/CollectionData.hpp" | ||||
| #include <ArduinoJson/Collection/CollectionData.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Array/ArrayRef.hpp" | ||||
| #include "ObjectRef.hpp" | ||||
| #include <ArduinoJson/Array/ArrayRef.hpp> | ||||
| #include <ArduinoJson/Object/ObjectRef.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Variant/SlotFunctions.hpp" | ||||
| #include "Pair.hpp" | ||||
| #include <ArduinoJson/Object/Pair.hpp> | ||||
| #include <ArduinoJson/Variant/SlotFunctions.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "ObjectFunctions.hpp" | ||||
| #include "ObjectIterator.hpp" | ||||
| #include <ArduinoJson/Object/ObjectFunctions.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. | ||||
|   | ||||
| @@ -4,9 +4,9 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Polyfills/attributes.hpp" | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include "../Strings/StringAdapters.hpp" | ||||
| #include <ArduinoJson/Polyfills/attributes.hpp> | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
| #include <ArduinoJson/Strings/StringAdapters.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
| template <typename TParent, typename TStringRef> | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Strings/String.hpp" | ||||
| #include "../Variant/VariantRef.hpp" | ||||
| #include <ArduinoJson/Strings/String.hpp> | ||||
| #include <ArduinoJson/Variant/VariantRef.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
| // A key value pair for CollectionData. | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Polyfills/attributes.hpp" | ||||
| #include <ArduinoJson/Polyfills/attributes.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Variant/VariantRef.hpp" | ||||
| #include <ArduinoJson/Variant/VariantRef.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,10 +4,10 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "VariantCasts.hpp" | ||||
| #include "VariantComparisons.hpp" | ||||
| #include "VariantOr.hpp" | ||||
| #include "VariantShortcuts.hpp" | ||||
| #include <ArduinoJson/Operators/VariantCasts.hpp> | ||||
| #include <ArduinoJson/Operators/VariantComparisons.hpp> | ||||
| #include <ArduinoJson/Operators/VariantOr.hpp> | ||||
| #include <ArduinoJson/Operators/VariantShortcuts.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,9 +4,9 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Polyfills/attributes.hpp" | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include "../Variant/VariantAs.hpp" | ||||
| #include <ArduinoJson/Polyfills/attributes.hpp> | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
| #include <ArduinoJson/Variant/VariantAs.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Array/ArrayShortcuts.hpp" | ||||
| #include "../Object/ObjectShortcuts.hpp" | ||||
| #include <ArduinoJson/Array/ArrayShortcuts.hpp> | ||||
| #include <ArduinoJson/Object/ObjectShortcuts.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -6,8 +6,9 @@ | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include <stdlib.h>  // for size_t | ||||
| #include "../Configuration.hpp" | ||||
| #include "../Polyfills/math.hpp" | ||||
|  | ||||
| #include <ArduinoJson/Configuration.hpp> | ||||
| #include "math.hpp" | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../assert.hpp" | ||||
| #include <ArduinoJson/Polyfills/assert.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include "type_traits.hpp" | ||||
|  | ||||
| #ifdef _MSC_VER | ||||
| #pragma warning(push) | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../../Configuration.hpp" | ||||
| #include <ArduinoJson/Configuration.hpp> | ||||
| #include "is_same.hpp" | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
|  | ||||
| #if ARDUINOJSON_ENABLE_ARDUINO_STRING | ||||
| #include <WString.h> | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Configuration.hpp" | ||||
| #include <ArduinoJson/Configuration.hpp> | ||||
|  | ||||
| #if ARDUINOJSON_ENABLE_STD_STREAM | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "./DummyWriter.hpp" | ||||
| #include <ArduinoJson/Serialization/DummyWriter.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,11 +4,11 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "./DynamicStringWriter.hpp" | ||||
| #include "./StaticStringWriter.hpp" | ||||
| #include <ArduinoJson/Serialization/DynamicStringWriter.hpp> | ||||
| #include <ArduinoJson/Serialization/StaticStringWriter.hpp> | ||||
|  | ||||
| #if ARDUINOJSON_ENABLE_STD_STREAM | ||||
| #include "./StreamWriter.hpp" | ||||
| #include <ArduinoJson/Serialization/StreamWriter.hpp> | ||||
| #endif | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Memory/MemoryPool.hpp" | ||||
| #include "../Memory/StringBuilder.hpp" | ||||
| #include <ArduinoJson/Memory/MemoryPool.hpp> | ||||
| #include <ArduinoJson/Memory/StringBuilder.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "./StringCopier.hpp" | ||||
| #include "./StringMover.hpp" | ||||
| #include <ArduinoJson/StringStorage/StringCopier.hpp> | ||||
| #include <ArduinoJson/StringStorage/StringMover.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -5,7 +5,8 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <WString.h> | ||||
| #include "../Polyfills/safe_strcmp.hpp" | ||||
|  | ||||
| #include <ArduinoJson/Polyfills/safe_strcmp.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -6,7 +6,8 @@ | ||||
|  | ||||
| #include <stddef.h>  // size_t | ||||
| #include <string.h>  // strcmp | ||||
| #include "../Polyfills/safe_strcmp.hpp" | ||||
|  | ||||
| #include <ArduinoJson/Polyfills/safe_strcmp.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Polyfills/pgmspace.hpp" | ||||
| #include <ArduinoJson/Polyfills/pgmspace.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "ConstRamStringAdapter.hpp" | ||||
| #include <ArduinoJson/Strings/ConstRamStringAdapter.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "ConstRamStringAdapter.hpp" | ||||
| #include <ArduinoJson/Strings/ConstRamStringAdapter.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Memory/MemoryPool.hpp" | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include <ArduinoJson/Memory/MemoryPool.hpp> | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
| template <typename> | ||||
| @@ -18,19 +18,19 @@ template <typename T> | ||||
| struct IsString<T&> : IsString<T> {}; | ||||
| }  // namespace ARDUINOJSON_NAMESPACE | ||||
|  | ||||
| #include "ConstRamStringAdapter.hpp" | ||||
| #include "RamStringAdapter.hpp" | ||||
| #include "SizedRamStringAdapter.hpp" | ||||
| #include <ArduinoJson/Strings/ConstRamStringAdapter.hpp> | ||||
| #include <ArduinoJson/Strings/RamStringAdapter.hpp> | ||||
| #include <ArduinoJson/Strings/SizedRamStringAdapter.hpp> | ||||
|  | ||||
| #if ARDUINOJSON_ENABLE_STD_STRING | ||||
| #include "StlStringAdapter.hpp" | ||||
| #include <ArduinoJson/Strings/StlStringAdapter.hpp> | ||||
| #endif | ||||
|  | ||||
| #if ARDUINOJSON_ENABLE_ARDUINO_STRING | ||||
| #include "ArduinoStringAdapter.hpp" | ||||
| #include <ArduinoJson/Strings/ArduinoStringAdapter.hpp> | ||||
| #endif | ||||
|  | ||||
| #if ARDUINOJSON_ENABLE_PROGMEM | ||||
| #include "FlashStringAdapter.hpp" | ||||
| #include "SizedFlashStringAdapter.hpp" | ||||
| #include <ArduinoJson/Strings/FlashStringAdapter.hpp> | ||||
| #include <ArduinoJson/Strings/SizedFlashStringAdapter.hpp> | ||||
| #endif | ||||
|   | ||||
| @@ -4,10 +4,8 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Memory/MemoryPool.hpp" | ||||
| #include "../Polyfills/assert.hpp" | ||||
| #include "../Strings/StringAdapters.hpp" | ||||
| #include "VariantData.hpp" | ||||
| #include <ArduinoJson/Polyfills/assert.hpp> | ||||
| #include <ArduinoJson/Variant/VariantData.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Serialization/DynamicStringWriter.hpp" | ||||
| #include <ArduinoJson/Serialization/DynamicStringWriter.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,9 +4,9 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Serialization/DynamicStringWriter.hpp" | ||||
| #include "VariantFunctions.hpp" | ||||
| #include "VariantRef.hpp" | ||||
| #include <ArduinoJson/Serialization/DynamicStringWriter.hpp> | ||||
| #include <ArduinoJson/Variant/VariantFunctions.hpp> | ||||
| #include <ArduinoJson/Variant/VariantRef.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -6,9 +6,9 @@ | ||||
|  | ||||
| #include <stddef.h>  // size_t | ||||
|  | ||||
| #include "../Collection/CollectionData.hpp" | ||||
| #include "../Numbers/Float.hpp" | ||||
| #include "../Numbers/Integer.hpp" | ||||
| #include <ArduinoJson/Collection/CollectionData.hpp> | ||||
| #include <ArduinoJson/Numbers/Float.hpp> | ||||
| #include <ArduinoJson/Numbers/Integer.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,10 +4,11 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Misc/SerializedValue.hpp" | ||||
| #include "../Numbers/convertNumber.hpp" | ||||
| #include "../Polyfills/gsl/not_null.hpp" | ||||
| #include "VariantContent.hpp" | ||||
| #include <ArduinoJson/Misc/SerializedValue.hpp> | ||||
| #include <ArduinoJson/Numbers/convertNumber.hpp> | ||||
| #include <ArduinoJson/Polyfills/gsl/not_null.hpp> | ||||
| #include <ArduinoJson/Strings/RamStringAdapter.hpp> | ||||
| #include <ArduinoJson/Variant/VariantContent.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "VariantData.hpp" | ||||
| #include <ArduinoJson/Variant/VariantData.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,11 +4,11 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Configuration.hpp" | ||||
| #include "../Numbers/convertNumber.hpp" | ||||
| #include "../Numbers/parseFloat.hpp" | ||||
| #include "../Numbers/parseInteger.hpp" | ||||
| #include "VariantRef.hpp" | ||||
| #include <ArduinoJson/Configuration.hpp> | ||||
| #include <ArduinoJson/Numbers/convertNumber.hpp> | ||||
| #include <ArduinoJson/Numbers/parseFloat.hpp> | ||||
| #include <ArduinoJson/Numbers/parseInteger.hpp> | ||||
| #include <ArduinoJson/Variant/VariantRef.hpp> | ||||
|  | ||||
| #include <string.h>  // for strcmp | ||||
|  | ||||
|   | ||||
| @@ -7,13 +7,13 @@ | ||||
| #include <stddef.h> | ||||
| #include <stdint.h>  // for uint8_t | ||||
|  | ||||
| #include "../Memory/MemoryPool.hpp" | ||||
| #include "../Misc/Visitable.hpp" | ||||
| #include "../Operators/VariantOperators.hpp" | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include "VariantAs.hpp" | ||||
| #include "VariantFunctions.hpp" | ||||
| #include "VariantRef.hpp" | ||||
| #include <ArduinoJson/Memory/MemoryPool.hpp> | ||||
| #include <ArduinoJson/Misc/Visitable.hpp> | ||||
| #include <ArduinoJson/Operators/VariantOperators.hpp> | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
| #include <ArduinoJson/Variant/VariantAs.hpp> | ||||
| #include <ArduinoJson/Variant/VariantFunctions.hpp> | ||||
| #include <ArduinoJson/Variant/VariantRef.hpp> | ||||
|  | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
|   | ||||
| @@ -4,9 +4,9 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "../Polyfills/gsl/not_null.hpp" | ||||
| #include "../Polyfills/type_traits.hpp" | ||||
| #include "../Variant/VariantContent.hpp" | ||||
| #include <ArduinoJson/Polyfills/gsl/not_null.hpp> | ||||
| #include <ArduinoJson/Polyfills/type_traits.hpp> | ||||
| #include <ArduinoJson/Variant/VariantContent.hpp> | ||||
|  | ||||
| #include <stdint.h>  // int8_t, int16_t | ||||
|  | ||||
| @@ -14,6 +14,8 @@ namespace ARDUINOJSON_NAMESPACE { | ||||
|  | ||||
| typedef conditional<sizeof(void*) <= 2, int8_t, int16_t>::type VariantSlotDiff; | ||||
|  | ||||
| class VairantData; | ||||
|  | ||||
| class VariantSlot { | ||||
|   // CAUTION: same layout as VariantData | ||||
|   // we cannot use composition because it adds padding | ||||
|   | ||||
		Reference in New Issue
	
	Block a user