mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Replace with JsonVariant::link()
This commit is contained in:
		| @@ -303,9 +303,4 @@ inline bool canConvertFromJson(VariantConstRef src, const std::string_view&) { | ||||
|  | ||||
| #endif | ||||
|  | ||||
| inline void convertToJson(JsonDocument* src, VariantRef dst) { | ||||
|   VariantData* data = getData(dst); | ||||
|   data->setPointer(getData(src->as<VariantRef>())); | ||||
| } | ||||
|  | ||||
| }  // namespace ARDUINOJSON_NAMESPACE | ||||
|   | ||||
| @@ -198,6 +198,11 @@ class VariantRef : public VariantRefBase<VariantData>, | ||||
|   template <typename TString> | ||||
|   FORCE_INLINE VariantRef getOrAddMember(const TString &) const; | ||||
|  | ||||
|   FORCE_INLINE void link(VariantRef var) { | ||||
|     if (_data) | ||||
|       _data->setPointer(var._data); | ||||
|   } | ||||
|  | ||||
|   FORCE_INLINE void remove(size_t index) const { | ||||
|     if (_data) | ||||
|       _data->remove(index); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user