Renamed undocumented function isUndefined() to isUnbound()

This commit is contained in:
Benoit Blanchon
2021-12-16 14:55:26 +01:00
parent e16767af92
commit 0f529a3587
15 changed files with 26 additions and 24 deletions

View File

@ -139,14 +139,14 @@ class JsonDocument : public Visitable {
// containsKey(const __FlashStringHelper*) const
template <typename TChar>
bool containsKey(TChar* key) const {
return !getMember(key).isUndefined();
return !getMember(key).isUnbound();
}
// containsKey(const std::string&) const
// containsKey(const String&) const
template <typename TString>
bool containsKey(const TString& key) const {
return !getMember(key).isUndefined();
return !getMember(key).isUnbound();
}
// operator[](const std::string&)

View File

@ -40,14 +40,14 @@ template <typename TObject>
template <typename TString>
inline typename enable_if<IsString<TString>::value, bool>::type
ObjectShortcuts<TObject>::containsKey(const TString& key) const {
return !impl()->getMember(key).isUndefined();
return !impl()->getMember(key).isUnbound();
}
template <typename TObject>
template <typename TChar>
inline typename enable_if<IsString<TChar*>::value, bool>::type
ObjectShortcuts<TObject>::containsKey(TChar* key) const {
return !impl()->getMember(key).isUndefined();
return !impl()->getMember(key).isUnbound();
}
template <typename TObject>

View File

@ -77,7 +77,7 @@ class ObjectConstRef : public ObjectRefBase<const CollectionData>,
// containsKey(const String&) const
template <typename TString>
FORCE_INLINE bool containsKey(const TString& key) const {
return !getMember(key).isUndefined();
return !getMember(key).isUnbound();
}
// containsKey(char*) const
@ -85,7 +85,7 @@ class ObjectConstRef : public ObjectRefBase<const CollectionData>,
// containsKey(const __FlashStringHelper*) const
template <typename TChar>
FORCE_INLINE bool containsKey(TChar* key) const {
return !getMember(key).isUndefined();
return !getMember(key).isUnbound();
}
// getMember(const std::string&) const

View File

@ -17,7 +17,7 @@ CompareResult compare(const T1 &lhs, const T2 &rhs); // VariantCompare.cpp
template <typename TVariant>
struct VariantOperators {
// Returns the default value if the VariantRef is undefined or incompatible
// Returns the default value if the VariantRef is unbound or incompatible
//
// int operator|(JsonVariant, int)
// float operator|(JsonVariant, float)

View File

@ -32,7 +32,7 @@ class VariantRefBase : public VariantTag {
return variantIsNull(_data);
}
FORCE_INLINE bool isUndefined() const {
FORCE_INLINE bool isUnbound() const {
return !_data;
}