mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 16:14:05 +01:00
Added JsonVariant::clear()
This commit is contained in:
@@ -47,6 +47,10 @@ class ElementProxy : public VariantOperators<ElementProxy<TArray> >,
|
||||
return *this;
|
||||
}
|
||||
|
||||
FORCE_INLINE void clear() const {
|
||||
getUpstreamElement().clear();
|
||||
}
|
||||
|
||||
FORCE_INLINE bool isNull() const {
|
||||
return getUpstreamElement().isNull();
|
||||
}
|
||||
|
||||
@@ -49,6 +49,10 @@ class MemberProxy : public VariantOperators<MemberProxy<TObject, TStringRef> >,
|
||||
return *this;
|
||||
}
|
||||
|
||||
FORCE_INLINE void clear() const {
|
||||
getUpstreamMember().clear();
|
||||
}
|
||||
|
||||
FORCE_INLINE bool isNull() const {
|
||||
return getUpstreamMember().isNull();
|
||||
}
|
||||
|
||||
@@ -136,6 +136,10 @@ class VariantRef : public VariantRefBase<VariantData>,
|
||||
// Creates an uninitialized VariantRef
|
||||
FORCE_INLINE VariantRef() : base_type(0), _pool(0) {}
|
||||
|
||||
FORCE_INLINE void clear() const {
|
||||
return variantSetNull(_data);
|
||||
}
|
||||
|
||||
// set(bool value)
|
||||
FORCE_INLINE bool set(bool value) const {
|
||||
return variantSetBoolean(_data, value);
|
||||
|
||||
Reference in New Issue
Block a user