mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-30 02:37:35 +02:00
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)
|
||||
* Added operators `==` and `!=` for two `JsonVariant`s (issue #436)
|
||||
* Fixed `JsonVariant::operator[const FlashStringHelper*]` (issue #441)
|
||||
|
||||
v5.8.2
|
||||
------
|
||||
|
@ -97,7 +97,7 @@ class JsonVariantBase : public Internals::JsonPrintable<TImpl> {
|
||||
}
|
||||
//
|
||||
// const JsonObjectSubscript operator[](TKey) const;
|
||||
// TKey = const char*, const char[N], const FlashStringHelper*
|
||||
// TKey = const std::string&, const String&
|
||||
template <typename TString>
|
||||
FORCE_INLINE typename TypeTraits::EnableIf<
|
||||
Internals::StringTraits<TString>::has_equals,
|
||||
@ -107,10 +107,10 @@ class JsonVariantBase : public Internals::JsonPrintable<TImpl> {
|
||||
}
|
||||
//
|
||||
// JsonObjectSubscript operator[](TKey);
|
||||
// TKey = const std::string&, const String&
|
||||
// TKey = const char*, const char[N], const FlashStringHelper*
|
||||
template <typename TString>
|
||||
FORCE_INLINE typename TypeTraits::EnableIf<
|
||||
Internals::StringTraits<TString *>::has_equals,
|
||||
Internals::StringTraits<const TString *>::has_equals,
|
||||
JsonObjectSubscript<const TString *> >::type
|
||||
operator[](const TString *key) {
|
||||
return as<JsonObject>()[key];
|
||||
|
Reference in New Issue
Block a user