Address a few other small pieces of feedback

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>
This commit is contained in:
Nicholas Van Sickle
2021-12-21 16:47:13 -08:00
parent deb3568aaa
commit fd70a2207e
3 changed files with 10 additions and 14 deletions
@@ -113,10 +113,6 @@ namespace AZ::Dom
{
}
Value::Value()
{
}
Value::Value(const Value& value)
: m_value(value.m_value)
{
@@ -344,7 +340,7 @@ namespace AZ::Dom
bool Value::IsBool() const
{
return AZStd::holds_alternative<bool>(m_value);
return GetType() == Type::Bool;
}
bool Value::IsNode() const
@@ -383,17 +379,17 @@ namespace AZ::Dom
bool Value::IsInt() const
{
return AZStd::holds_alternative<int64_t>(m_value);
return GetType() == Type::Int64;
}
bool Value::IsUint() const
{
return AZStd::holds_alternative<uint64_t>(m_value);
return GetType() == Type::Uint64;
}
bool Value::IsDouble() const
{
return AZStd::holds_alternative<double>(m_value);
return GetType() == Type::Double;
}
bool Value::IsString() const
@@ -666,7 +662,7 @@ namespace AZ::Dom
Object::ContainerType& object = GetObjectInternal();
if (!object.empty())
{
AZStd::swap(*pos, object.back());
*pos = AZStd::move(object.back());
object.pop_back();
}
return object.end();
+4 -4
View File
@@ -103,9 +103,9 @@ namespace AZ::Dom
{
public:
Node() = default;
Node(AZ::Name name);
Node(const Node&) = default;
Node(Node&&) = default;
explicit Node(AZ::Name name);
explicit Node(const Node&) = default;
explicit Node(Node&&) = default;
Node& operator=(const Node&) = default;
Node& operator=(Node&&) = default;
@@ -188,7 +188,7 @@ namespace AZ::Dom
OpaqueStorageType>;
// Constructors...
Value();
Value() = default;
Value(const Value&);
Value(Value&&) noexcept;
Value(AZStd::string_view stringView, bool copy);
@@ -70,7 +70,7 @@ namespace AZ::Dom
Visitor::Result ValueWriter::RefCountedString(AZStd::shared_ptr<const AZStd::vector<char>> value, [[maybe_unused]] Lifetime lifetime)
{
CurrentValue().SetString(value);
CurrentValue().SetString(AZStd::move(value));
return FinishWrite();
}