forked from bblanchon/ArduinoJson
Fixed JsonVariant::operator[const FlashStringHelper*]
(issue #441)
This commit is contained in:
@ -6,6 +6,7 @@ HEAD
|
|||||||
|
|
||||||
* Fixed an access violation in `DynamicJsonBuffer` when memory allocation fails (issue #433)
|
* Fixed an access violation in `DynamicJsonBuffer` when memory allocation fails (issue #433)
|
||||||
* Added operators `==` and `!=` for two `JsonVariant`s (issue #436)
|
* Added operators `==` and `!=` for two `JsonVariant`s (issue #436)
|
||||||
|
* Fixed `JsonVariant::operator[const FlashStringHelper*]` (issue #441)
|
||||||
|
|
||||||
v5.8.2
|
v5.8.2
|
||||||
------
|
------
|
||||||
|
@ -97,7 +97,7 @@ class JsonVariantBase : public Internals::JsonPrintable<TImpl> {
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
// const JsonObjectSubscript operator[](TKey) const;
|
// const JsonObjectSubscript operator[](TKey) const;
|
||||||
// TKey = const char*, const char[N], const FlashStringHelper*
|
// TKey = const std::string&, const String&
|
||||||
template <typename TString>
|
template <typename TString>
|
||||||
FORCE_INLINE typename TypeTraits::EnableIf<
|
FORCE_INLINE typename TypeTraits::EnableIf<
|
||||||
Internals::StringTraits<TString>::has_equals,
|
Internals::StringTraits<TString>::has_equals,
|
||||||
@ -107,10 +107,10 @@ class JsonVariantBase : public Internals::JsonPrintable<TImpl> {
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
// JsonObjectSubscript operator[](TKey);
|
// JsonObjectSubscript operator[](TKey);
|
||||||
// TKey = const std::string&, const String&
|
// TKey = const char*, const char[N], const FlashStringHelper*
|
||||||
template <typename TString>
|
template <typename TString>
|
||||||
FORCE_INLINE typename TypeTraits::EnableIf<
|
FORCE_INLINE typename TypeTraits::EnableIf<
|
||||||
Internals::StringTraits<TString *>::has_equals,
|
Internals::StringTraits<const TString *>::has_equals,
|
||||||
JsonObjectSubscript<const TString *> >::type
|
JsonObjectSubscript<const TString *> >::type
|
||||||
operator[](const TString *key) {
|
operator[](const TString *key) {
|
||||||
return as<JsonObject>()[key];
|
return as<JsonObject>()[key];
|
||||||
|
Reference in New Issue
Block a user