mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Fix double lookup in to<JsonVariant>()
				
					
				
			Ported from 23b01a89b1e1faf2fdee4b7287e769676b21852b
This commit is contained in:
		| @@ -5,6 +5,7 @@ HEAD | |||||||
| ---- | ---- | ||||||
|  |  | ||||||
| * Fix compatibility with the Blynk libary (issue #1914) | * Fix compatibility with the Blynk libary (issue #1914) | ||||||
|  | * Fix double lookup in `to<JsonVariant>()` | ||||||
|  |  | ||||||
| v6.21.2 (2023-04-12) | v6.21.2 (2023-04-12) | ||||||
| ------- | ------- | ||||||
|   | |||||||
| @@ -138,8 +138,9 @@ template <typename TDerived> | |||||||
| template <typename T> | template <typename T> | ||||||
| typename enable_if<is_same<T, JsonVariant>::value, JsonVariant>::type | typename enable_if<is_same<T, JsonVariant>::value, JsonVariant>::type | ||||||
| VariantRefBase<TDerived>::to() const { | VariantRefBase<TDerived>::to() const { | ||||||
|   variantSetNull(getOrCreateData()); |   auto data = getOrCreateData(); | ||||||
|   return *this; |   variantSetNull(data); | ||||||
|  |   return JsonVariant(getPool(), data); | ||||||
| } | } | ||||||
|  |  | ||||||
| template <typename TDerived> | template <typename TDerived> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user