Add Path::IsEmpty
Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>
This commit is contained in:
@@ -395,7 +395,7 @@ namespace AZ::Dom
|
||||
const bool allowEndOfArray = (flags & ExistenceCheckFlags::AllowEndOfArray) != ExistenceCheckFlags::DefaultExistenceCheck;
|
||||
|
||||
Path target = path;
|
||||
if (target.Size() == 0)
|
||||
if (target.IsEmpty())
|
||||
{
|
||||
Value wrapper(Dom::Type::Array);
|
||||
wrapper.ArrayPushBack(rootElement);
|
||||
|
||||
@@ -246,6 +246,11 @@ namespace AZ::Dom
|
||||
return m_entries.size();
|
||||
}
|
||||
|
||||
bool Path::IsEmpty() const
|
||||
{
|
||||
return m_entries.empty();
|
||||
}
|
||||
|
||||
PathEntry& Path::operator[](size_t index)
|
||||
{
|
||||
return m_entries[index];
|
||||
|
||||
@@ -111,6 +111,7 @@ namespace AZ::Dom
|
||||
void Clear();
|
||||
PathEntry At(size_t index) const;
|
||||
size_t Size() const;
|
||||
bool IsEmpty() const;
|
||||
|
||||
PathEntry& operator[](size_t index);
|
||||
const PathEntry& operator[](size_t index) const;
|
||||
|
||||
Reference in New Issue
Block a user