Round of clang compile fixes

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>
monroegm-disable-blank-issue-2
Nicholas Van Sickle 4 years ago
parent fd70a2207e
commit f69b9b817c

@ -22,7 +22,7 @@ namespace AZ::Dom::Utils
return backend.ReadFromBufferInPlace(string.data(), string.size(), visitor);
}
AZ::Outcome<Value, AZStd::string> AZ::Dom::Utils::WriteToValue(Backend::WriteCallback writeCallback)
AZ::Outcome<Value, AZStd::string> WriteToValue(Backend::WriteCallback writeCallback)
{
Value value;
AZStd::unique_ptr<Visitor> writer = value.GetWriteHandler();

@ -6,8 +6,6 @@
*
*/
#pragma once
#include <AzCore/DOM/DomValue.h>
#include <AzCore/DOM/DomValueWriter.h>
#include <AzCore/std/smart_ptr/make_shared.h>
@ -31,11 +29,7 @@ namespace AZ::Dom
namespace Internal
{
template<class TestType>
constexpr size_t GetTypeIndexInternal(size_t index = 0)
{
static_assert(false, "Type not found in ValueType");
return index;
}
constexpr size_t GetTypeIndexInternal(size_t index = 0);
template<class TestType, class FirstType, class... Rest>
constexpr size_t GetTypeIndexInternal(size_t index = 0)
@ -143,7 +137,7 @@ namespace AZ::Dom
Value Value::FromOpaqueValue(const AZStd::any& value)
{
return Value(&value);
return Value(value);
}
Value::Value(int8_t value)

@ -129,7 +129,7 @@ namespace AZ::Dom
AZStd::string::format("AZ::Dom::ValueWriter: %s called from within a different container type", endMethodName));
}
if (buffer.m_attributes.size() != attributeCount)
if (static_cast<AZ::u64>(buffer.m_attributes.size()) != attributeCount)
{
return VisitorFailure(
VisitorErrorCode::InternalError,
@ -138,7 +138,7 @@ namespace AZ::Dom
buffer.m_attributes.size()));
}
if (buffer.m_elements.size() != elementCount)
if (static_cast<AZ::u64>(buffer.m_elements.size()) != elementCount)
{
return VisitorFailure(
VisitorErrorCode::InternalError,
@ -146,6 +146,7 @@ namespace AZ::Dom
"AZ::Dom::ValueWriter: %s expected %llu elements but received %llu elements instead", endMethodName, elementCount,
buffer.m_elements.size()));
}
if (buffer.m_attributes.size() > 0)
{
MoveVectorMemory(container.GetMutableObject(), buffer.m_attributes);
@ -237,8 +238,6 @@ namespace AZ::Dom
m_entryStack.top().m_value.Swap(value);
ValueInfo& newEntry = m_entryStack.top();
constexpr const size_t reserveSize = 8;
if (!newEntry.m_key.IsEmpty())
{
GetValueBuffer().m_attributes.emplace_back(AZStd::move(newEntry.m_key), AZStd::move(value));

Loading…
Cancel
Save