mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Set clang-format standard to C++11 (#1820)
This commit is contained in:
		| @@ -11,8 +11,8 @@ ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE | ||||
| // A proxy class to get or set an element of an array. | ||||
| // https://arduinojson.org/v6/api/jsonarray/subscript/ | ||||
| template <typename TUpstream> | ||||
| class ElementProxy : public VariantRefBase<ElementProxy<TUpstream> >, | ||||
|                      public VariantOperators<ElementProxy<TUpstream> > { | ||||
| class ElementProxy : public VariantRefBase<ElementProxy<TUpstream>>, | ||||
|                      public VariantOperators<ElementProxy<TUpstream>> { | ||||
|   friend class VariantAttorney; | ||||
|  | ||||
|  public: | ||||
|   | ||||
| @@ -10,7 +10,7 @@ ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE | ||||
|  | ||||
| template <typename TSource> | ||||
| struct Reader<TSource, | ||||
|               typename enable_if<is_base_of< ::String, TSource>::value>::type> | ||||
|               typename enable_if<is_base_of<::String, TSource>::value>::type> | ||||
|     : BoundedReader<const char*> { | ||||
|   explicit Reader(const ::String& s) | ||||
|       : BoundedReader<const char*>(s.c_str(), s.length()) {} | ||||
|   | ||||
| @@ -173,7 +173,7 @@ class JsonDocument : public detail::VariantOperators<const JsonDocument&> { | ||||
|   template <typename TString> | ||||
|   FORCE_INLINE typename detail::enable_if< | ||||
|       detail::IsString<TString>::value, | ||||
|       detail::MemberProxy<JsonDocument&, TString> >::type | ||||
|       detail::MemberProxy<JsonDocument&, TString>>::type | ||||
|   operator[](const TString& key) { | ||||
|     return {*this, key}; | ||||
|   } | ||||
| @@ -183,7 +183,7 @@ class JsonDocument : public detail::VariantOperators<const JsonDocument&> { | ||||
|   template <typename TChar> | ||||
|   FORCE_INLINE typename detail::enable_if< | ||||
|       detail::IsString<TChar*>::value, | ||||
|       detail::MemberProxy<JsonDocument&, TChar*> >::type | ||||
|       detail::MemberProxy<JsonDocument&, TChar*>>::type | ||||
|   operator[](TChar* key) { | ||||
|     return {*this, key}; | ||||
|   } | ||||
|   | ||||
| @@ -108,10 +108,10 @@ class JsonObject : public detail::VariantOperators<JsonObject> { | ||||
|   // Gets or sets the member with specified key. | ||||
|   // https://arduinojson.org/v6/api/jsonobject/subscript/ | ||||
|   template <typename TString> | ||||
|   FORCE_INLINE typename detail::enable_if< | ||||
|       detail::IsString<TString>::value, | ||||
|       detail::MemberProxy<JsonObject, TString> >::type | ||||
|   operator[](const TString& key) const { | ||||
|   FORCE_INLINE | ||||
|       typename detail::enable_if<detail::IsString<TString>::value, | ||||
|                                  detail::MemberProxy<JsonObject, TString>>::type | ||||
|       operator[](const TString& key) const { | ||||
|     return {*this, key}; | ||||
|   } | ||||
|  | ||||
| @@ -120,7 +120,7 @@ class JsonObject : public detail::VariantOperators<JsonObject> { | ||||
|   template <typename TChar> | ||||
|   FORCE_INLINE | ||||
|       typename detail::enable_if<detail::IsString<TChar*>::value, | ||||
|                                  detail::MemberProxy<JsonObject, TChar*> >::type | ||||
|                                  detail::MemberProxy<JsonObject, TChar*>>::type | ||||
|       operator[](TChar* key) const { | ||||
|     return {*this, key}; | ||||
|   } | ||||
|   | ||||
| @@ -69,7 +69,7 @@ VariantRefBase<TDerived>::containsKey(TChar* key) const { | ||||
| template <typename TDerived> | ||||
| template <typename TString> | ||||
| inline typename enable_if<IsString<TString*>::value, | ||||
|                           MemberProxy<TDerived, TString*> >::type | ||||
|                           MemberProxy<TDerived, TString*>>::type | ||||
| VariantRefBase<TDerived>::operator[](TString* key) const { | ||||
|   return MemberProxy<TDerived, TString*>(derived(), key); | ||||
| } | ||||
| @@ -77,7 +77,7 @@ VariantRefBase<TDerived>::operator[](TString* key) const { | ||||
| template <typename TDerived> | ||||
| template <typename TString> | ||||
| inline typename enable_if<IsString<TString>::value, | ||||
|                           MemberProxy<TDerived, TString> >::type | ||||
|                           MemberProxy<TDerived, TString>>::type | ||||
| VariantRefBase<TDerived>::operator[](const TString& key) const { | ||||
|   return MemberProxy<TDerived, TString>(derived(), key); | ||||
| } | ||||
|   | ||||
| @@ -12,8 +12,8 @@ ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE | ||||
| // https://arduinojson.org/v6/api/jsonobject/subscript/ | ||||
| template <typename TUpstream, typename TStringRef> | ||||
| class MemberProxy | ||||
|     : public VariantRefBase<MemberProxy<TUpstream, TStringRef> >, | ||||
|       public VariantOperators<MemberProxy<TUpstream, TStringRef> > { | ||||
|     : public VariantRefBase<MemberProxy<TUpstream, TStringRef>>, | ||||
|       public VariantOperators<MemberProxy<TUpstream, TStringRef>> { | ||||
|   friend class VariantAttorney; | ||||
|  | ||||
|  public: | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
| ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE | ||||
|  | ||||
| template <> | ||||
| class Writer< ::String, void> { | ||||
| class Writer<::String, void> { | ||||
|   static const size_t bufferCapacity = ARDUINOJSON_STRING_BUFFER_SIZE; | ||||
|  | ||||
|  public: | ||||
|   | ||||
| @@ -11,7 +11,7 @@ ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE | ||||
| template <typename TDestination> | ||||
| class Writer< | ||||
|     TDestination, | ||||
|     typename enable_if<is_base_of< ::Print, TDestination>::value>::type> { | ||||
|     typename enable_if<is_base_of<::Print, TDestination>::value>::type> { | ||||
|  public: | ||||
|   explicit Writer(::Print& print) : _print(&print) {} | ||||
|  | ||||
|   | ||||
| @@ -15,7 +15,7 @@ template <class T> | ||||
| struct is_std_string : false_type {}; | ||||
|  | ||||
| template <class TCharTraits, class TAllocator> | ||||
| struct is_std_string<std::basic_string<char, TCharTraits, TAllocator> > | ||||
| struct is_std_string<std::basic_string<char, TCharTraits, TAllocator>> | ||||
|     : true_type {}; | ||||
|  | ||||
| template <typename TDestination> | ||||
|   | ||||
| @@ -161,7 +161,7 @@ convertToJson(const T& src, JsonVariant dst) { | ||||
| } | ||||
|  | ||||
| template <> | ||||
| struct Converter<SerializedValue<const char*> > | ||||
| struct Converter<SerializedValue<const char*>> | ||||
|     : private detail::VariantAttorney { | ||||
|   static void toJson(SerializedValue<const char*> src, JsonVariant dst) { | ||||
|     auto data = getData(dst); | ||||
|   | ||||
| @@ -234,14 +234,14 @@ class VariantRefBase : public VariantTag { | ||||
|   // https://arduinojson.org/v6/api/jsonvariant/subscript/ | ||||
|   template <typename TString> | ||||
|   FORCE_INLINE typename enable_if<IsString<TString>::value, | ||||
|                                   MemberProxy<TDerived, TString> >::type | ||||
|                                   MemberProxy<TDerived, TString>>::type | ||||
|   operator[](const TString& key) const; | ||||
|  | ||||
|   // Gets or sets an object member. | ||||
|   // https://arduinojson.org/v6/api/jsonvariant/subscript/ | ||||
|   template <typename TChar> | ||||
|   FORCE_INLINE typename enable_if<IsString<TChar*>::value, | ||||
|                                   MemberProxy<TDerived, TChar*> >::type | ||||
|                                   MemberProxy<TDerived, TChar*>>::type | ||||
|   operator[](TChar* key) const; | ||||
|  | ||||
|   // Creates an array and adds it to the object. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user