fix them all
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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.",
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace ImageProcessingAtom
|
||||
for (i; i < ePixelFormat_Count; i++)
|
||||
{
|
||||
const PixelFormatInfo* info = CPixelFormats::GetInstance().GetPixelFormatInfo((EPixelFormat)i);
|
||||
if (info->d3d10Format == dxgiFormat)
|
||||
if (static_cast<AZ::u32>(info->d3d10Format) == dxgiFormat)
|
||||
{
|
||||
eFormat = (EPixelFormat)i;
|
||||
break;
|
||||
@@ -509,7 +509,7 @@ namespace ImageProcessingAtom
|
||||
for (i; i < ePixelFormat_Count; i++)
|
||||
{
|
||||
const PixelFormatInfo* info = CPixelFormats::GetInstance().GetPixelFormatInfo((EPixelFormat)i);
|
||||
if (info->d3d10Format == dxgiFormat)
|
||||
if (static_cast<uint32_t>(info->d3d10Format) == dxgiFormat)
|
||||
{
|
||||
format = (EPixelFormat)i;
|
||||
break;
|
||||
|
||||
@@ -353,7 +353,7 @@ namespace AZ
|
||||
}
|
||||
|
||||
// If the number of source LUTs have changed, the shader variant will need to be updated
|
||||
if (m_numSourceLuts != current)
|
||||
if (m_numSourceLuts != static_cast<unsigned int>(current))
|
||||
{
|
||||
m_numSourceLuts = current;
|
||||
m_needToUpdateShaderVariant = true;
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace MaterialEditor
|
||||
|
||||
QSize newDeviceSize = m_materialViewport->size();
|
||||
AZ_Warning(
|
||||
"Material Editor", newDeviceSize.width() == width && newDeviceSize.height() == height,
|
||||
"Material Editor", static_cast<uint32_t>(newDeviceSize.width()) == width && static_cast<uint32_t>(newDeviceSize.height()) == height,
|
||||
"Resizing the window did not give the expected frame size. Requested %d x %d but got %d x %d.", width, height,
|
||||
newDeviceSize.width(), newDeviceSize.height());
|
||||
}
|
||||
|
||||
@@ -1480,7 +1480,7 @@ bool AZ::FFont::UpdateTexture()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_fontTexture->GetWidth() != m_fontImage->GetDescriptor().m_size.m_width || m_fontTexture->GetHeight() != m_fontImage->GetDescriptor().m_size.m_height)
|
||||
if (m_fontTexture->GetWidth() != static_cast<int>(m_fontImage->GetDescriptor().m_size.m_width) || m_fontTexture->GetHeight() != static_cast<int>(m_fontImage->GetDescriptor().m_size.m_height))
|
||||
{
|
||||
AZ_Assert(false, "AtomFont::FFont:::UpdateTexture size mismatch between texture and image!");
|
||||
return false;
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace AudioControls
|
||||
for (int i = 0; i < size; ++i)
|
||||
{
|
||||
QListWidgetItem* listItem = m_connectionList->item(i);
|
||||
if (listItem && listItem->data(eMDR_ID).toInt() == middlewareControl->GetId())
|
||||
if (listItem && listItem->data(eMDR_ID).toInt() == static_cast<int>(middlewareControl->GetId()))
|
||||
{
|
||||
m_connectionList->clearSelection();
|
||||
listItem->setSelected(true);
|
||||
|
||||
@@ -795,7 +795,7 @@ namespace EditorPythonBindings
|
||||
}
|
||||
}
|
||||
|
||||
AZ_Warning("python", PyDict_Size(pyObj.ptr()) == mapDataContainer->Size(mapInstance.m_address), "Python Dict size:%d does not match the size of the unordered_map:%d", pos, mapDataContainer->Size(mapInstance.m_address));
|
||||
AZ_Warning("python", static_cast<size_t>(PyDict_Size(pyObj.ptr())) == mapDataContainer->Size(mapInstance.m_address), "Python Dict size:%d does not match the size of the unordered_map:%d", pos, mapDataContainer->Size(mapInstance.m_address));
|
||||
outValue.m_value = mapInstance.m_address;
|
||||
outValue.m_typeId = mapInstance.m_typeId;
|
||||
outValue.m_traits = traits;
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace UnitTest
|
||||
{
|
||||
for (AZ::u32 x = 0; x < width; ++x)
|
||||
{
|
||||
if ((x == pixelX) && (y == pixelY))
|
||||
if ((x == static_cast<int>(pixelX)) && (y == static_cast<int>(pixelY)))
|
||||
{
|
||||
m_imageData->m_imageData.push_back(pixelValue);
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ void SpriteBorderEditor::AddConfigureSection(QGridLayout* gridLayout, int& rowNu
|
||||
int newNumCols = numColsLineEdit->text().toInt(&colConversionSuccess);
|
||||
|
||||
const bool positiveInputs = newNumRows > 0 && newNumCols > 0;
|
||||
const bool valueChanged = m_numRows != newNumRows || m_numCols != newNumCols;
|
||||
const bool valueChanged = m_numRows != static_cast<uint>(newNumRows) || m_numCols != static_cast<uint>(newNumCols);
|
||||
|
||||
// This number of cells is just nearly unusable in the sprite editor UI. Supporting
|
||||
// more would likely require reworking of UX/UI and even implementation.
|
||||
|
||||
@@ -2068,7 +2068,7 @@ int UiTextComponent::GetFontEffect()
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void UiTextComponent::SetFontEffect(int effectIndex)
|
||||
{
|
||||
if (m_fontEffectIndex != effectIndex)
|
||||
if (m_fontEffectIndex != static_cast<unsigned int>(effectIndex))
|
||||
{
|
||||
m_fontEffectIndex = effectIndex;
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace
|
||||
//! \brief Given a UTF8 string and index, return the raw string buffer index that maps to the UTF8 index.
|
||||
int GetCharArrayIndexFromUtf8CharIndex(const AZStd::string& utf8String, const uint utf8Index)
|
||||
{
|
||||
int utfIndexIter = 0;
|
||||
uint utfIndexIter = 0;
|
||||
int rawIndex = 0;
|
||||
|
||||
const AZStd::string::size_type stringLength = utf8String.length();
|
||||
|
||||
@@ -525,7 +525,7 @@ namespace NvCloth
|
||||
|
||||
const int numVertices = subMeshInfo.m_numVertices;
|
||||
const int firstVertex = subMeshInfo.m_verticesFirstIndex;
|
||||
if (subMesh.GetVertexCount() != numVertices)
|
||||
if (subMesh.GetVertexCount() != static_cast<uint32_t>(numVertices))
|
||||
{
|
||||
AZ_Error("ClothComponentMesh", false,
|
||||
"Render mesh to be modified doesn't have the same number of vertices (%d) as the cloth's submesh (%d).",
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace ScriptedEntityTweener
|
||||
|
||||
bool IsTimelineIdValid(int timelineId)
|
||||
{
|
||||
return timelineId != AnimationProperties::InvalidTimelineId;
|
||||
return timelineId != static_cast<int>(AnimationProperties::InvalidTimelineId);
|
||||
}
|
||||
|
||||
bool InitializeSubtask(ScriptedEntityTweenerSubtask& subtask, const AZStd::pair<AnimationParameterAddressData, AZStd::any> initData, AnimationParameters params);
|
||||
|
||||
@@ -39,7 +39,6 @@ ly_append_configurations_options(
|
||||
|
||||
# Disabling these warnings while they get fixed
|
||||
/wd4245 # conversion, signed/unsigned mismatch
|
||||
/wd4389 # comparison, signed/unsigned mismatch
|
||||
|
||||
# Enabling warnings that are disabled by default from /W4
|
||||
# https://docs.microsoft.com/en-us/cpp/preprocessor/compiler-warnings-that-are-off-by-default?view=vs-2019
|
||||
|
||||
Reference in New Issue
Block a user