forked from bblanchon/ArduinoJson
Fix double lookup in to<JsonVariant>()
This commit is contained in:
@ -15,3 +15,4 @@ HEAD
|
||||
* Reference-count shared strings
|
||||
* Always store `serialized("string")` by copy (#1915)
|
||||
* 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>
|
||||
typename enable_if<is_same<T, JsonVariant>::value, JsonVariant>::type
|
||||
VariantRefBase<TDerived>::to() const {
|
||||
detail::VariantData::setNull(getOrCreateData(), getResourceManager());
|
||||
return *this;
|
||||
auto data = getOrCreateData();
|
||||
auto resources = getResourceManager();
|
||||
detail::VariantData::setNull(data, resources);
|
||||
return JsonVariant(data, resources);
|
||||
}
|
||||
|
||||
template <typename TDerived>
|
||||
|
Reference in New Issue
Block a user