mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-31 03:07:35 +02:00
Fix double lookup in to<JsonVariant>()
This commit is contained in:
@ -15,3 +15,4 @@ HEAD
|
|||||||
* Reference-count shared strings
|
* Reference-count shared strings
|
||||||
* Always store `serialized("string")` by copy (#1915)
|
* Always store `serialized("string")` by copy (#1915)
|
||||||
* Remove the zero-copy mode of `deserializeJson()` and `deserializeMsgPack()`
|
* Remove the zero-copy mode of `deserializeJson()` and `deserializeMsgPack()`
|
||||||
|
* Fix double lookup in `to<JsonVariant>()`
|
||||||
|
@ -105,8 +105,10 @@ 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 {
|
||||||
detail::VariantData::setNull(getOrCreateData(), getResourceManager());
|
auto data = getOrCreateData();
|
||||||
return *this;
|
auto resources = getResourceManager();
|
||||||
|
detail::VariantData::setNull(data, resources);
|
||||||
|
return JsonVariant(data, resources);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename TDerived>
|
template <typename TDerived>
|
||||||
|
Reference in New Issue
Block a user