fix them all

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
pappeste
2021-06-25 18:33:22 -07:00
committed by Esteban Papp
parent f02957c140
commit 58f8b563d0
22 changed files with 28 additions and 29 deletions
+5 -5
View File
@@ -677,11 +677,11 @@ void CTriMesh::GetEdgesByVertex(MeshElementsArray& inVertices, MeshElementsArray
std::sort(inVertices.begin(), inVertices.end());
for (int i = 0; i < GetEdgeCount(); i++)
{
if (stl::binary_find(inVertices.begin(), inVertices.end(), pEdges[i].v[0]) != inVertices.end())
if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast<int>(pEdges[i].v[0])) != inVertices.end())
{
outEdges.push_back(i);
}
else if (stl::binary_find(inVertices.begin(), inVertices.end(), pEdges[i].v[1]) != inVertices.end())
else if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast<int>(pEdges[i].v[1])) != inVertices.end())
{
outEdges.push_back(i);
}
@@ -696,15 +696,15 @@ void CTriMesh::GetFacesByVertex(MeshElementsArray& inVertices, MeshElementsArray
std::sort(inVertices.begin(), inVertices.end());
for (int i = 0; i < GetFacesCount(); i++)
{
if (stl::binary_find(inVertices.begin(), inVertices.end(), pFaces[i].v[0]) != inVertices.end())
if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast<int>(pFaces[i].v[0])) != inVertices.end())
{
outFaces.push_back(i);
}
else if (stl::binary_find(inVertices.begin(), inVertices.end(), pFaces[i].v[1]) != inVertices.end())
else if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast<int>(pFaces[i].v[1])) != inVertices.end())
{
outFaces.push_back(i);
}
else if (stl::binary_find(inVertices.begin(), inVertices.end(), pFaces[i].v[2]) != inVertices.end())
else if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast<int>(pFaces[i].v[2])) != inVertices.end())
{
outFaces.push_back(i);
}
+1 -1
View File
@@ -1283,7 +1283,7 @@ void CEntityObject::UpdateVisibility(bool bVisible)
CBaseObject::UpdateVisibility(bVisible);
bool bVisibleWithSpec = bVisible && !IsHiddenBySpec();
if (bVisibleWithSpec != m_bVisible)
if (bVisibleWithSpec != static_cast<bool>(m_bVisible))
{
m_bVisible = bVisibleWithSpec;
}
+1 -1
View File
@@ -1559,7 +1559,7 @@ void CTrackViewDialog::OnAddSelectedNode()
selectedEntitiesCount, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntitiesCount);
// check to make sure all nodes were added and notify user if they weren't
if (addedNodes.GetCount() != selectedEntitiesCount)
if (addedNodes.GetCount() != static_cast<unsigned int>(selectedEntitiesCount))
{
IMovieSystem* movieSystem = GetIEditor()->GetMovieSystem();
+1 -1
View File
@@ -1113,7 +1113,7 @@ void CTrackViewNodesCtrl::OnNMRclick(QPoint point)
selectedEntitiesCount, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntitiesCount);
// check to make sure all nodes were added and notify user if they weren't
if (addedNodes.GetCount() != selectedEntitiesCount)
if (addedNodes.GetCount() != static_cast<unsigned int>(selectedEntitiesCount))
{
IMovieSystem* movieSystem = GetIEditor()->GetMovieSystem();
@@ -188,7 +188,7 @@ namespace AZ
s32 numAvailableSlots = CalculateAvailableRequestSlots();
status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, numAvailableSlots);
status.m_isIdle = status.m_isIdle &&
numAvailableSlots == m_numBlocks &&
static_cast<u32>(numAvailableSlots) == m_numBlocks &&
m_delayedSections.empty();
}
@@ -94,7 +94,7 @@ namespace UnitTest
float testStoreValues[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
VectorType::StoreUnaligned(testStoreValues, result);
for (int32_t i = 0; i < VectorType::ElementCount; ++i)
for (uint32_t i = 0; i < VectorType::ElementCount; ++i)
{
if (i == replaceIndex)
{
@@ -235,7 +235,7 @@ namespace AZ::IO::ArchiveInternal
return 0;
}
if (nReadBytes != nTotal)
if (static_cast<size_t>(nReadBytes) != nTotal)
{
AZ_Warning("Archive", false, "FRead did not read expected number of byte from file, only %zu of %lld bytes read", nTotal, nReadBytes);
nTotal = (size_t)nReadBytes;
@@ -1791,11 +1791,11 @@ namespace AZ::IO
AZ_Assert(m_pZip, "ZipFile is nullptr");
AZ_Assert(m_pFileEntry && m_pZip->IsOwnerOf(m_pFileEntry), "ZipFile is not owner of m_pFileEntry");
if (nDataSize != m_pFileEntry->desc.lSizeUncompressed && bDecompress)
if (static_cast<uint32_t>(nDataSize) != m_pFileEntry->desc.lSizeUncompressed && bDecompress)
{
return false;
}
else if (nDataSize != m_pFileEntry->desc.lSizeCompressed && !bDecompress)
else if (static_cast<uint32_t>(nDataSize) != m_pFileEntry->desc.lSizeCompressed && !bDecompress)
{
return false;
}
@@ -104,7 +104,7 @@ namespace AZ::IO::ZipDir::ZipDirStructuresInternal
if (*pReturnCode == Z_BUF_ERROR)
{
// As long as we consumed something, keep going. Only fail permanently if we've stalled.
if (nAvailIn != pZStream->avail_in || nAvailOut != pZStream->avail_out)
if (nAvailIn != static_cast<int>(pZStream->avail_in) || nAvailOut != static_cast<int>(pZStream->avail_out))
{
*pReturnCode = Z_OK;
}
@@ -88,7 +88,7 @@ namespace AZ
AZ_Error(
Utilities::ErrorWindow,
meshesPerTextureCoordinateIndex[texCoordIndex] == 0 ||
meshesPerTextureCoordinateIndex[texCoordIndex] == currentNode->mNumMeshes,
meshesPerTextureCoordinateIndex[texCoordIndex] == static_cast<int>(currentNode->mNumMeshes),
"Texture coordinate index %d for node %s is not on all meshes on this node. "
"Placeholder arbitrary texture values will be generated to allow the data to process, but the source art "
"needs to be fixed to correct this. All meshes on this node should have the same number of texture coordinate channels.",