fix w4018
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -85,7 +85,7 @@ namespace Benchmark
|
||||
|
||||
void BM_Prefab::CreateEntities(const unsigned int entityCount, AZStd::vector<AZ::Entity*>& entities)
|
||||
{
|
||||
for (int entityIndex = 0; entityIndex < entityCount; ++entityIndex)
|
||||
for (unsigned int entityIndex = 0; entityIndex < entityCount; ++entityIndex)
|
||||
{
|
||||
AZStd::string entityName = "TestEntity";
|
||||
entityName = entityName + AZStd::to_string(entityIndex);
|
||||
@@ -101,7 +101,7 @@ namespace Benchmark
|
||||
void BM_Prefab::CreateFakePaths(const unsigned int pathCount)
|
||||
{
|
||||
//setup fake paths
|
||||
for (int number = 0; number < pathCount; ++number)
|
||||
for (unsigned int number = 0; number < pathCount; ++number)
|
||||
{
|
||||
AZStd::string path = m_pathString;
|
||||
m_paths.push_back(path + AZStd::to_string(number) + "_" + AZStd::to_string(pathCount));
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Benchmark
|
||||
|
||||
state.ResumeTiming();
|
||||
|
||||
for (int instanceCounter = 0; instanceCounter < numInstances; ++instanceCounter)
|
||||
for (unsigned int instanceCounter = 0; instanceCounter < numInstances; ++instanceCounter)
|
||||
{
|
||||
newInstances.push_back(m_prefabSystemComponent->CreatePrefab(
|
||||
{ entities[instanceCounter] },
|
||||
@@ -110,7 +110,7 @@ namespace Benchmark
|
||||
AZStd::vector<AZStd::unique_ptr<Instance>> testInstances;
|
||||
testInstances.resize(numInstancesToAdd);
|
||||
|
||||
for (int instanceCounter = 0; instanceCounter < numInstancesToAdd; ++instanceCounter)
|
||||
for (unsigned int instanceCounter = 0; instanceCounter < numInstancesToAdd; ++instanceCounter)
|
||||
{
|
||||
testInstances[instanceCounter] = (m_prefabSystemComponent->CreatePrefab(
|
||||
{ entities[instanceCounter] }
|
||||
@@ -161,7 +161,7 @@ namespace Benchmark
|
||||
|
||||
state.ResumeTiming();
|
||||
|
||||
for (int instanceCounter = 0; instanceCounter < numInstances; ++instanceCounter)
|
||||
for (unsigned int instanceCounter = 0; instanceCounter < numInstances; ++instanceCounter)
|
||||
{
|
||||
nestedInstanceRoot = m_prefabSystemComponent->CreatePrefab(
|
||||
{},
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ namespace Benchmark
|
||||
|
||||
state.ResumeTiming();
|
||||
|
||||
for (int instanceCounter = 0; instanceCounter < numInstances; ++instanceCounter)
|
||||
for (unsigned int instanceCounter = 0; instanceCounter < numInstances; ++instanceCounter)
|
||||
{
|
||||
newInstances[instanceCounter] = m_prefabSystemComponent->InstantiatePrefab(templateToInstantiateId);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Benchmark
|
||||
|
||||
state.ResumeTiming();
|
||||
|
||||
for (int templateCounter = 0; templateCounter < numTemplates; ++templateCounter)
|
||||
for (unsigned int templateCounter = 0; templateCounter < numTemplates; ++templateCounter)
|
||||
{
|
||||
m_prefabLoaderInterface->LoadTemplateFromFile(m_paths[templateCounter]);
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ void CSystem::debug_GetCallStack(const char** pFunctions, int& nCount)
|
||||
unsigned int numFrames = StackRecorder::Record(frames, nMaxCount, 1);
|
||||
SymbolStorage::StackLine* textLines = (SymbolStorage::StackLine*)AZ_ALLOCA(sizeof(SymbolStorage::StackLine)*nMaxCount);
|
||||
SymbolStorage::DecodeFrames(frames, numFrames, textLines);
|
||||
for (int i = 0; i < numFrames; i++)
|
||||
for (unsigned int i = 0; i < numFrames; i++)
|
||||
{
|
||||
pFunctions[i] = textLines[i];
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace AZ
|
||||
AZStd::string AssImpMaterialWrapper::GetTextureFileName(MaterialMapType textureType) const
|
||||
{
|
||||
/// Engine currently doesn't support multiple textures. Right now we only use first texture.
|
||||
int textureIndex = 0;
|
||||
unsigned int textureIndex = 0;
|
||||
aiString absTexturePath;
|
||||
switch (textureType)
|
||||
{
|
||||
|
||||
@@ -612,10 +612,10 @@ namespace AZ
|
||||
ValueToKeyDataMap valueToKeyDataMap;
|
||||
// Key time can be less than zero, normalize to have zero be the lowest time.
|
||||
double keyOffset = 0;
|
||||
for (int keyIdx = 0; keyIdx < meshMorphAnim->mNumKeys; keyIdx++)
|
||||
for (unsigned int keyIdx = 0; keyIdx < meshMorphAnim->mNumKeys; keyIdx++)
|
||||
{
|
||||
aiMeshMorphKey& key = meshMorphAnim->mKeys[keyIdx];
|
||||
for (int valIdx = 0; valIdx < key.mNumValuesAndWeights; ++valIdx)
|
||||
for (unsigned int valIdx = 0; valIdx < key.mNumValuesAndWeights; ++valIdx)
|
||||
{
|
||||
int currentValue = key.mValues[valIdx];
|
||||
KeyData thisKey(key.mWeights[valIdx], key.mTime);
|
||||
|
||||
@@ -89,11 +89,11 @@ namespace AZ
|
||||
|
||||
bitangentStream->SetGenerationMethod(AZ::SceneAPI::DataTypes::TangentGenerationMethod::FromSourceScene);
|
||||
bitangentStream->ReserveContainerSpace(vertexCount);
|
||||
for (int sdkMeshIndex = 0; sdkMeshIndex < currentNode->mNumMeshes; ++sdkMeshIndex)
|
||||
for (unsigned int sdkMeshIndex = 0; sdkMeshIndex < currentNode->mNumMeshes; ++sdkMeshIndex)
|
||||
{
|
||||
const aiMesh* mesh = scene->mMeshes[currentNode->mMeshes[sdkMeshIndex]];
|
||||
|
||||
for (int v = 0; v < mesh->mNumVertices; ++v)
|
||||
for (unsigned int v = 0; v < mesh->mNumVertices; ++v)
|
||||
{
|
||||
if (!mesh->HasTangentsAndBitangents())
|
||||
{
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace AZ
|
||||
{
|
||||
int sceneMeshIdx = context.m_sourceNode.GetAssImpNode()->mMeshes[nodeMeshIdx];
|
||||
const aiMesh* aiMesh = context.m_sourceScene.GetAssImpScene()->mMeshes[sceneMeshIdx];
|
||||
for (int animIdx = 0; animIdx < aiMesh->mNumAnimMeshes; animIdx++)
|
||||
for (unsigned int animIdx = 0; animIdx < aiMesh->mNumAnimMeshes; animIdx++)
|
||||
{
|
||||
aiAnimMesh* aiAnimMesh = aiMesh->mAnimMeshes[animIdx];
|
||||
animToMeshToAnimMeshIndices[aiAnimMesh->mName.C_Str()].emplace_back(nodeMeshIdx, animIdx);
|
||||
@@ -130,7 +130,7 @@ namespace AZ
|
||||
blendShapeData->ReserveData(
|
||||
aiAnimMesh->mNumVertices, aiAnimMesh->HasTangentsAndBitangents(), uvSetUsedFlags, colorSetUsedFlags);
|
||||
|
||||
for (int vertIdx = 0; vertIdx < aiAnimMesh->mNumVertices; ++vertIdx)
|
||||
for (unsigned int vertIdx = 0; vertIdx < aiAnimMesh->mNumVertices; ++vertIdx)
|
||||
{
|
||||
AZ::Vector3 vertex(AssImpSDKWrapper::AssImpTypeConverter::ToVector3(aiAnimMesh->mVertices[vertIdx]));
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace AZ
|
||||
}
|
||||
|
||||
// aiAnimMesh just has a list of positions for vertices. The face indices are on the original mesh.
|
||||
for (int faceIdx = 0; faceIdx < aiMesh->mNumFaces; ++faceIdx)
|
||||
for (unsigned int faceIdx = 0; faceIdx < aiMesh->mNumFaces; ++faceIdx)
|
||||
{
|
||||
aiFace face = aiMesh->mFaces[faceIdx];
|
||||
DataTypes::IBlendShapeData::Face blendFace;
|
||||
@@ -199,7 +199,7 @@ namespace AZ
|
||||
face.mNumIndices);
|
||||
continue;
|
||||
}
|
||||
for (int idx = 0; idx < face.mNumIndices; ++idx)
|
||||
for (unsigned int idx = 0; idx < face.mNumIndices; ++idx)
|
||||
{
|
||||
blendFace.vertexIndex[idx] = face.mIndices[idx] + vertexOffset;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace AZ
|
||||
const aiScene* scene = context.m_sourceScene.GetAssImpScene();
|
||||
|
||||
// This node has at least one mesh, verify that the color channel counts are the same for all meshes.
|
||||
const int expectedColorChannels = scene->mMeshes[currentNode->mMeshes[0]]->GetNumColorChannels();
|
||||
const unsigned int expectedColorChannels = scene->mMeshes[currentNode->mMeshes[0]]->GetNumColorChannels();
|
||||
const bool allMeshesHaveSameNumberOfColorChannels =
|
||||
AZStd::all_of(currentNode->mMeshes + 1, currentNode->mMeshes + currentNode->mNumMeshes, [scene, expectedColorChannels](const unsigned int meshIndex)
|
||||
{
|
||||
@@ -80,17 +80,16 @@ namespace AZ
|
||||
const uint64_t vertexCount = GetVertexCountForAllMeshesOnNode(*currentNode, *scene);
|
||||
|
||||
Events::ProcessingResultCombiner combinedVertexColorResults;
|
||||
for (int colorSetIndex = 0; colorSetIndex < expectedColorChannels; ++colorSetIndex)
|
||||
for (unsigned int colorSetIndex = 0; colorSetIndex < expectedColorChannels; ++colorSetIndex)
|
||||
{
|
||||
|
||||
AZStd::shared_ptr<SceneData::GraphData::MeshVertexColorData> vertexColors =
|
||||
AZStd::make_shared<AZ::SceneData::GraphData::MeshVertexColorData>();
|
||||
vertexColors->ReserveContainerSpace(vertexCount);
|
||||
|
||||
for (int sdkMeshIndex = 0; sdkMeshIndex < currentNode->mNumMeshes; ++sdkMeshIndex)
|
||||
for (unsigned int sdkMeshIndex = 0; sdkMeshIndex < currentNode->mNumMeshes; ++sdkMeshIndex)
|
||||
{
|
||||
const aiMesh* mesh = scene->mMeshes[currentNode->mMeshes[sdkMeshIndex]];
|
||||
for (int v = 0; v < mesh->mNumVertices; ++v)
|
||||
for (unsigned int v = 0; v < mesh->mNumVertices; ++v)
|
||||
{
|
||||
if (colorSetIndex < mesh->GetNumColorChannels())
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace AZ
|
||||
Events::ProcessingResultCombiner combinedMaterialImportResults;
|
||||
|
||||
AZStd::unordered_map<int, AZStd::shared_ptr<SceneData::GraphData::MaterialData>> materialMap;
|
||||
for (int idx = 0; idx < context.m_sourceNode.m_assImpNode->mNumMeshes; ++idx)
|
||||
for (unsigned int idx = 0; idx < context.m_sourceNode.m_assImpNode->mNumMeshes; ++idx)
|
||||
{
|
||||
int meshIndex = context.m_sourceNode.m_assImpNode->mMeshes[idx];
|
||||
const aiMesh* assImpMesh = context.m_sourceScene.GetAssImpScene()->mMeshes[meshIndex];
|
||||
|
||||
@@ -91,11 +91,11 @@ namespace AZ
|
||||
|
||||
tangentStream->SetGenerationMethod(AZ::SceneAPI::DataTypes::TangentGenerationMethod::FromSourceScene);
|
||||
tangentStream->ReserveContainerSpace(vertexCount);
|
||||
for (int sdkMeshIndex = 0; sdkMeshIndex < currentNode->mNumMeshes; ++sdkMeshIndex)
|
||||
for (unsigned int sdkMeshIndex = 0; sdkMeshIndex < currentNode->mNumMeshes; ++sdkMeshIndex)
|
||||
{
|
||||
const aiMesh* mesh = scene->mMeshes[currentNode->mMeshes[sdkMeshIndex]];
|
||||
|
||||
for (int v = 0; v < mesh->mNumVertices; ++v)
|
||||
for (unsigned int v = 0; v < mesh->mNumVertices; ++v)
|
||||
{
|
||||
if (!mesh->HasTangentsAndBitangents())
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace AZ
|
||||
// so they can be separated by engine code instead.
|
||||
bool foundTextureCoordinates = false;
|
||||
AZStd::array<int, AI_MAX_NUMBER_OF_TEXTURECOORDS> meshesPerTextureCoordinateIndex = {};
|
||||
for (int localMeshIndex = 0; localMeshIndex < currentNode->mNumMeshes; ++localMeshIndex)
|
||||
for (unsigned int localMeshIndex = 0; localMeshIndex < currentNode->mNumMeshes; ++localMeshIndex)
|
||||
{
|
||||
aiMesh* mesh = scene->mMeshes[currentNode->mMeshes[localMeshIndex]];
|
||||
for (int texCoordIndex = 0; texCoordIndex < meshesPerTextureCoordinateIndex.size(); ++texCoordIndex)
|
||||
@@ -110,7 +110,7 @@ namespace AZ
|
||||
uvMap->ReserveContainerSpace(vertexCount);
|
||||
bool customNameFound = false;
|
||||
AZStd::string name(AZStd::string::format("%s%d", m_defaultNodeName, texCoordIndex));
|
||||
for (int sdkMeshIndex = 0; sdkMeshIndex < currentNode->mNumMeshes; ++sdkMeshIndex)
|
||||
for (unsigned int sdkMeshIndex = 0; sdkMeshIndex < currentNode->mNumMeshes; ++sdkMeshIndex)
|
||||
{
|
||||
const aiMesh* mesh = scene->mMeshes[currentNode->mMeshes[sdkMeshIndex]];
|
||||
if(mesh->mTextureCoords[texCoordIndex])
|
||||
@@ -136,7 +136,7 @@ namespace AZ
|
||||
}
|
||||
}
|
||||
|
||||
for (int v = 0; v < mesh->mNumVertices; ++v)
|
||||
for (unsigned int v = 0; v < mesh->mNumVertices; ++v)
|
||||
{
|
||||
if (mesh->mTextureCoords[texCoordIndex])
|
||||
{
|
||||
|
||||
+4
-4
@@ -40,7 +40,7 @@ namespace AZ::SceneAPI::SceneBuilder
|
||||
// This code re-combines them to match previous FBX SDK behavior,
|
||||
// so they can be separated by engine code instead.
|
||||
int vertOffset = 0;
|
||||
for (int m = 0; m < currentNode->mNumMeshes; ++m)
|
||||
for (unsigned int m = 0; m < currentNode->mNumMeshes; ++m)
|
||||
{
|
||||
const aiMesh* mesh = scene->mMeshes[currentNode->mMeshes[m]];
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace AZ::SceneAPI::SceneBuilder
|
||||
assImpMatIndexToLYIndex.insert(AZStd::pair<int, int>(mesh->mMaterialIndex, lyMeshIndex++));
|
||||
}
|
||||
|
||||
for (int vertIdx = 0; vertIdx < mesh->mNumVertices; ++vertIdx)
|
||||
for (unsigned int vertIdx = 0; vertIdx < mesh->mNumVertices; ++vertIdx)
|
||||
{
|
||||
AZ::Vector3 vertex(mesh->mVertices[vertIdx].x, mesh->mVertices[vertIdx].y, mesh->mVertices[vertIdx].z);
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace AZ::SceneAPI::SceneBuilder
|
||||
}
|
||||
}
|
||||
|
||||
for (int faceIdx = 0; faceIdx < mesh->mNumFaces; ++faceIdx)
|
||||
for (unsigned int faceIdx = 0; faceIdx < mesh->mNumFaces; ++faceIdx)
|
||||
{
|
||||
aiFace face = mesh->mFaces[faceIdx];
|
||||
AZ::SceneAPI::DataTypes::IMeshData::Face meshFace;
|
||||
@@ -82,7 +82,7 @@ namespace AZ::SceneAPI::SceneBuilder
|
||||
face.mNumIndices);
|
||||
continue;
|
||||
}
|
||||
for (int idx = 0; idx < face.mNumIndices; ++idx)
|
||||
for (unsigned int idx = 0; idx < face.mNumIndices; ++idx)
|
||||
{
|
||||
meshFace.vertexIndex[idx] = face.mIndices[idx] + vertOffset;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ namespace AWSCore
|
||||
// assigned to a specific CPU starting with the specified CPU.
|
||||
AZ::JobManagerDesc jobManagerDesc{};
|
||||
AZ::JobManagerThreadDesc threadDesc(m_firstThreadCPU, m_threadPriority, m_threadStackSize);
|
||||
for (unsigned int i = 0; i < m_threadCount; ++i)
|
||||
for (int i = 0; i < m_threadCount; ++i)
|
||||
{
|
||||
jobManagerDesc.m_workerThreads.push_back(threadDesc);
|
||||
if (threadDesc.m_cpuId > -1)
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace AWSCore
|
||||
AZStd::chrono::seconds lastSendTimeStamp = AZStd::chrono::seconds(lastSendTimeStampSeconds);
|
||||
AZStd::chrono::seconds secondsSinceLastSend =
|
||||
AZStd::chrono::duration_cast<AZStd::chrono::seconds>(AZStd::chrono::system_clock::now().time_since_epoch()) - lastSendTimeStamp;
|
||||
if (secondsSinceLastSend.count() >= delayInSeconds)
|
||||
if (static_cast<AZ::u64>(secondsSinceLastSend.count()) >= delayInSeconds)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace AWSMetrics
|
||||
AZStd::lock_guard<AZStd::mutex> lock(m_metricsMutex);
|
||||
m_metricsQueue.AddMetrics(metricsEvent);
|
||||
|
||||
if (m_metricsQueue.GetSizeInBytes() >= m_clientConfiguration->GetMaxQueueSizeInBytes())
|
||||
if (m_metricsQueue.GetSizeInBytes() >= static_cast<size_t>(m_clientConfiguration->GetMaxQueueSizeInBytes()))
|
||||
{
|
||||
// Flush the metrics queue when the accumulated metrics size hits the limit
|
||||
m_waitEvent.release();
|
||||
@@ -431,7 +431,7 @@ namespace AWSMetrics
|
||||
AZStd::lock_guard<AZStd::mutex> lock(m_metricsMutex);
|
||||
m_metricsQueue.AddMetrics(offlineRecords[index]);
|
||||
|
||||
if (m_metricsQueue.GetSizeInBytes() >= m_clientConfiguration->GetMaxQueueSizeInBytes())
|
||||
if (m_metricsQueue.GetSizeInBytes() >= static_cast<size_t>(m_clientConfiguration->GetMaxQueueSizeInBytes()))
|
||||
{
|
||||
// Flush the metrics queue when the accumulated metrics size hits the limit
|
||||
m_waitEvent.release();
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace AWSMetrics
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int metricsIndex = 0; metricsIndex < doc.Size(); metricsIndex++)
|
||||
for (rapidjson::SizeType metricsIndex = 0; metricsIndex < doc.Size(); metricsIndex++)
|
||||
{
|
||||
MetricsEvent metrics;
|
||||
if (!metrics.ReadFromJson(doc[metricsIndex]))
|
||||
|
||||
@@ -252,8 +252,8 @@ int AZ::FontRenderer::GetGlyph(GlyphBitmap* glyphBitmap, int* horizontalAdvance,
|
||||
const int textureSlotBufferHeight = glyphBitmap->GetHeight();
|
||||
|
||||
// might happen if font characters are too big or cache dimenstions in font.xml is too small "<font path="VeraMono.ttf" w="320" h="368"/>"
|
||||
const bool charWidthFits = iX + m_glyph->bitmap.width <= textureSlotBufferWidth;
|
||||
const bool charHeightFits = iY + m_glyph->bitmap.rows <= textureSlotBufferHeight;
|
||||
const bool charWidthFits = static_cast<int>(iX + m_glyph->bitmap.width) <= textureSlotBufferWidth;
|
||||
const bool charHeightFits = static_cast<int>(iY + m_glyph->bitmap.rows) <= textureSlotBufferHeight;
|
||||
const bool charFitsInSlot = charWidthFits && charHeightFits;
|
||||
AZ_Error("Font", charFitsInSlot, "Character code %d doesn't fit in font texture; check 'sizeRatio' attribute in font XML or adjust this character's sizing in the font.", characterCode);
|
||||
|
||||
|
||||
@@ -450,7 +450,7 @@ namespace Blast
|
||||
const auto buffer = m_asset.GetAccelerator()->fillDebugRender(-1, mode == DebugRenderAabbTreeSegments);
|
||||
if (buffer.lineCount)
|
||||
{
|
||||
for (int i = 0; i < buffer.lineCount; ++i)
|
||||
for (uint32_t i = 0; i < buffer.lineCount; ++i)
|
||||
{
|
||||
auto& line = buffer.lines[i];
|
||||
AZ::Color color;
|
||||
|
||||
@@ -562,7 +562,7 @@ namespace Blast
|
||||
public:
|
||||
FakeEntityProvider(uint32_t entityCount)
|
||||
{
|
||||
for (int i = 0; i < entityCount; ++i)
|
||||
for (uint32 i = 0; i < entityCount; ++i)
|
||||
{
|
||||
m_entities.push_back(AZStd::make_shared<AZ::Entity>());
|
||||
}
|
||||
|
||||
@@ -1555,7 +1555,7 @@ namespace EMotionFX
|
||||
const uint32 geomLODLevel = 0;
|
||||
const uint32 numNodes = mSkeleton->GetNumNodes();
|
||||
|
||||
for (int nodeIndex = 0; nodeIndex < numNodes; nodeIndex++)
|
||||
for (uint32 nodeIndex = 0; nodeIndex < numNodes; nodeIndex++)
|
||||
{
|
||||
// check if this node has a mesh, if not we can skip it
|
||||
Mesh* mesh = GetMesh(geomLODLevel, nodeIndex);
|
||||
|
||||
@@ -116,9 +116,9 @@ namespace UnitTest
|
||||
size_t value = 0;
|
||||
AZStd::hash_combine(value, seed);
|
||||
|
||||
for (int x = 0; x < width; ++x)
|
||||
for (AZ::u32 x = 0; x < width; ++x)
|
||||
{
|
||||
for (int y = 0; y < height; ++y)
|
||||
for (AZ::u32 y = 0; y < height; ++y)
|
||||
{
|
||||
AZStd::hash_combine(value, x);
|
||||
AZStd::hash_combine(value, y);
|
||||
@@ -141,9 +141,9 @@ namespace UnitTest
|
||||
const AZ::u8 pixelValue = 255;
|
||||
|
||||
// Image data should be stored inverted on the y axis relative to our engine, so loop backwards through y.
|
||||
for (int y = height - 1; y >= 0; --y)
|
||||
for (int y = static_cast<int>(height) - 1; y >= 0; --y)
|
||||
{
|
||||
for (int x = 0; x < width; ++x)
|
||||
for (AZ::u32 x = 0; x < width; ++x)
|
||||
{
|
||||
if ((x == pixelX) && (y == pixelY))
|
||||
{
|
||||
|
||||
@@ -409,7 +409,7 @@ void ImGuiManager::Render()
|
||||
break;
|
||||
|
||||
case ImGuiResolutionMode::MatchToMaxRenderResolution:
|
||||
if (backBufferWidth <= static_cast<int>(m_renderResolution.x))
|
||||
if (backBufferWidth <= static_cast<AZ::u32>(m_renderResolution.x))
|
||||
{
|
||||
renderRes[0] = backBufferWidth;
|
||||
renderRes[1] = backBufferHeight;
|
||||
|
||||
@@ -353,10 +353,10 @@ namespace LmbrCentral
|
||||
const AZ::u32 sides, const AZ::u32 segments, const AZ::u32 capSegments,
|
||||
AZ::u32* indices)
|
||||
{
|
||||
const auto capSegmentTipVerts = capSegments > 0 ? 1 : 0;
|
||||
const auto totalSegments = segments + capSegments * 2;
|
||||
const auto numVerts = sides * (totalSegments + 1) + 2 * capSegmentTipVerts;
|
||||
const auto hasEnds = capSegments > 0;
|
||||
const AZ::u32 capSegmentTipVerts = capSegments > 0 ? 1 : 0;
|
||||
const AZ::u32 totalSegments = segments + capSegments * 2;
|
||||
const AZ::u32 numVerts = sides * (totalSegments + 1) + 2 * capSegmentTipVerts;
|
||||
const AZ::u32 hasEnds = capSegments > 0;
|
||||
|
||||
// Start Faces (start point of tube)
|
||||
// Each starting face shares the same vertex at the beginning of the vertex buffer
|
||||
@@ -365,8 +365,7 @@ namespace LmbrCentral
|
||||
// 1 face per side
|
||||
if (hasEnds)
|
||||
{
|
||||
|
||||
for (auto i = 0; i < sides; ++i)
|
||||
for (AZ::u32 i = 0; i < sides; ++i)
|
||||
{
|
||||
AZ::u32 a = i + 1;
|
||||
AZ::u32 b = a + 1;
|
||||
@@ -383,9 +382,9 @@ namespace LmbrCentral
|
||||
// Middle Faces
|
||||
// 2 triangles per face.
|
||||
// 1 face per side.
|
||||
for (auto i = 0; i < totalSegments; ++i)
|
||||
for (AZ::u32 i = 0; i < totalSegments; ++i)
|
||||
{
|
||||
for (auto j = 0; j < sides; ++j)
|
||||
for (AZ::u32 j = 0; j < sides; ++j)
|
||||
{
|
||||
// 4 corners for each face
|
||||
// a ------ d
|
||||
@@ -416,7 +415,7 @@ namespace LmbrCentral
|
||||
// 1 face per side
|
||||
if (hasEnds)
|
||||
{
|
||||
for (auto i = 0; i < sides; ++i)
|
||||
for (AZ::u32 i = 0; i < sides; ++i)
|
||||
{
|
||||
AZ::u32 a = totalSegments * sides + i + 1;
|
||||
AZ::u32 b = a + 1;
|
||||
|
||||
@@ -1093,7 +1093,7 @@ void CUiAnimViewSequence::DeselectAllKeys()
|
||||
CUiAnimViewSequenceNotificationContext context(this);
|
||||
|
||||
CUiAnimViewKeyBundle selectedKeys = GetSelectedKeys();
|
||||
for (int i = 0; i < selectedKeys.GetKeyCount(); ++i)
|
||||
for (unsigned int i = 0; i < selectedKeys.GetKeyCount(); ++i)
|
||||
{
|
||||
CUiAnimViewKeyHandle keyHandle = selectedKeys.GetKey(i);
|
||||
keyHandle.Select(false);
|
||||
@@ -1237,7 +1237,7 @@ float CUiAnimViewSequence::ClipTimeOffsetForSliding(const float timeOffset)
|
||||
for (pTrackIter = tracks.begin(); pTrackIter != tracks.end(); ++pTrackIter)
|
||||
{
|
||||
CUiAnimViewTrack* pTrack = *pTrackIter;
|
||||
for (int i = 0; i < pTrack->GetKeyCount(); ++i)
|
||||
for (unsigned int i = 0; i < pTrack->GetKeyCount(); ++i)
|
||||
{
|
||||
CUiAnimViewKeyHandle keyHandle = pTrack->GetKey(i);
|
||||
|
||||
|
||||
@@ -191,9 +191,9 @@ void SpriteBorderEditor::UpdateSpriteSheetCellInfo(int newNumRows, int newNumCol
|
||||
|
||||
// Calculate uniformly sized sprite-sheet cell UVs based on the given
|
||||
// row and column cell configuration.
|
||||
for (int row = 0; row < m_numRows; ++row)
|
||||
for (unsigned int row = 0; row < m_numRows; ++row)
|
||||
{
|
||||
for (int col = 0; col < m_numCols; ++col)
|
||||
for (unsigned int col = 0; col < m_numCols; ++col)
|
||||
{
|
||||
AZ::Vector2 min(col / floatNumCols, row / floatNumRows);
|
||||
AZ::Vector2 max((col + 1) / floatNumCols, (row + 1) / floatNumRows);
|
||||
|
||||
@@ -17,8 +17,9 @@ LyShine::AZu32ComboBoxVec LyShine::GetEnumSpriteIndexList(AZ::EntityId entityId,
|
||||
|
||||
int indexCount = 0;
|
||||
EBUS_EVENT_ID_RESULT(indexCount, entityId, UiIndexableImageBus, GetImageIndexCount);
|
||||
const AZ::u32 indexCountu32 = static_cast<AZ::u32>(indexCount);
|
||||
|
||||
if (indexCount > 0 && (indexMax <= indexCount - 1) && indexMin <= indexMax)
|
||||
if (indexCount > 0 && (indexMax <= indexCountu32 - 1) && indexMin <= indexMax)
|
||||
{
|
||||
for (AZ::u32 i = indexMin; i <= indexMax; ++i)
|
||||
{
|
||||
|
||||
@@ -224,9 +224,9 @@ namespace
|
||||
IDraw2d::Rounding pixelRounding = isPixelAligned ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None;
|
||||
float z = 1.0f;
|
||||
int i = 0;
|
||||
for (int y = 0; y < numY; ++y)
|
||||
for (uint32 y = 0; y < numY; ++y)
|
||||
{
|
||||
for (int x = 0; x < numX; x += 1)
|
||||
for (uint32 x = 0; x < numX; x += 1)
|
||||
{
|
||||
AZ::Vector3 point3(xValues[x], yValues[y], z);
|
||||
point3 = transform * point3;
|
||||
@@ -2030,7 +2030,7 @@ void UiImageComponent::ClipValuesForSlicedLinearFill(uint32 numValues, float* xV
|
||||
float previousPercentage = 0;
|
||||
int previousIndex = startClip;
|
||||
int clampIndex = -1; // to clamp all values greater than m_fillAmount in specified direction.
|
||||
for (int arrayPos = 1; arrayPos < numValues; ++arrayPos)
|
||||
for (uint32 arrayPos = 1; arrayPos < numValues; ++arrayPos)
|
||||
{
|
||||
int currentIndex = startClip + arrayPos * clipInc;
|
||||
float thisPercentage = (clipPosition[currentIndex] - clipPosition[startClip]) / totalLength;
|
||||
@@ -2102,7 +2102,7 @@ void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide,
|
||||
if (m_fillAmount < 0.5f)
|
||||
{
|
||||
// Clips against first half line and then rotating line and adds results to render list.
|
||||
for (int currentIndex = 0; currentIndex < totalIndices; currentIndex += 3)
|
||||
for (uint32 currentIndex = 0; currentIndex < totalIndices; currentIndex += 3)
|
||||
{
|
||||
SVF_P2F_C4B_T2F_F4B intermediateVerts[maxTemporaryVerts];
|
||||
uint16 intermediateIndices[maxTemporaryIndices];
|
||||
@@ -2118,7 +2118,7 @@ void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide,
|
||||
else
|
||||
{
|
||||
// Clips against first half line and adds results to render list then clips against the second half line and rotating line and also adds those results to render list.
|
||||
for (int currentIndex = 0; currentIndex < totalIndices; currentIndex += 3)
|
||||
for (uint32 currentIndex = 0; currentIndex < totalIndices; currentIndex += 3)
|
||||
{
|
||||
SVF_P2F_C4B_T2F_F4B intermediateVerts[maxTemporaryVerts];
|
||||
uint16 intermediateIndices[maxTemporaryIndices];
|
||||
@@ -2201,7 +2201,7 @@ void UiImageComponent::ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVe
|
||||
|
||||
int numIndicesToRender = 0;
|
||||
int vertexOffset = 0;
|
||||
for (int ix = 0; ix < totalIndices; ix += 3)
|
||||
for (uint32 ix = 0; ix < totalIndices; ix += 3)
|
||||
{
|
||||
int indicesUsed = ClipToLine(verts, &indices[ix], renderVerts, renderIndices, vertexOffset, numIndicesToRender, lineOrigin, lineEnd);
|
||||
numIndicesToRender += indicesUsed;
|
||||
|
||||
@@ -616,7 +616,7 @@ UiInteractableStateFont::FontEffectComboBoxVec UiInteractableStateFont::Populate
|
||||
// NOTE: Curently, in order for this to work, when the font is changed we need to do
|
||||
// "RefreshEntireTree" to get the combo box list refreshed.
|
||||
unsigned int numEffects = m_fontFamily ? m_fontFamily->normal->GetNumEffects() : 0;
|
||||
for (int i = 0; i < numEffects; ++i)
|
||||
for (unsigned int i = 0; i < numEffects; ++i)
|
||||
{
|
||||
const char* name = m_fontFamily->normal->GetEffectName(i);
|
||||
result.push_back(AZStd::make_pair(i, name));
|
||||
|
||||
@@ -830,7 +830,7 @@ void UiParticleEmitterComponent::Render(LyShine::IRenderGraph* renderGraph)
|
||||
AZ::u32 totalVerticesInserted = 0;
|
||||
|
||||
// particlesToRender is the max particles we will render, we could render less if some have zero alpha
|
||||
for (int i = 0; i < particlesToRender; ++i)
|
||||
for (AZ::u32 i = 0; i < particlesToRender; ++i)
|
||||
{
|
||||
SVF_P2F_C4B_T2F_F4B* firstVertexOfParticle = &m_cachedPrimitive.m_vertices[totalVerticesInserted];
|
||||
|
||||
@@ -1827,7 +1827,7 @@ void UiParticleEmitterComponent::ResetParticleBuffers()
|
||||
|
||||
const int verticesPerParticle = 4;
|
||||
int baseIndex = 0;
|
||||
for (int i = 0; i < numIndices; i += indicesPerParticle)
|
||||
for (AZ::u32 i = 0; i < numIndices; i += indicesPerParticle)
|
||||
{
|
||||
m_cachedPrimitive.m_indices[i + 0] = 0 + baseIndex;
|
||||
m_cachedPrimitive.m_indices[i + 1] = 1 + baseIndex;
|
||||
|
||||
@@ -3527,7 +3527,7 @@ UiTextComponent::FontEffectComboBoxVec UiTextComponent::PopulateFontEffectList()
|
||||
if (m_font)
|
||||
{
|
||||
unsigned int numEffects = m_font->GetNumEffects();
|
||||
for (int i = 0; i < numEffects; ++i)
|
||||
for (unsigned int i = 0; i < numEffects; ++i)
|
||||
{
|
||||
const char* name = m_font->GetEffectName(i);
|
||||
result.push_back(AZStd::make_pair(i, name));
|
||||
|
||||
@@ -697,7 +697,7 @@ namespace PhysXDebug
|
||||
if (GetCurrentPxScene())
|
||||
{
|
||||
// Reserve vector capacity
|
||||
const int numTriangles = rb.getNbTriangles();
|
||||
const physx::PxU32 numTriangles = static_cast<physx::PxU32>(rb.getNbTriangles());
|
||||
m_trianglePoints.reserve(numTriangles * 3);
|
||||
m_triangleColors.reserve(numTriangles * 3);
|
||||
|
||||
@@ -731,7 +731,7 @@ namespace PhysXDebug
|
||||
|
||||
if (GetCurrentPxScene())
|
||||
{
|
||||
const int numLines = rb.getNbLines();
|
||||
const physx::PxU32 numLines = static_cast<physx::PxU32>(rb.getNbLines());
|
||||
|
||||
// Reserve vector capacity
|
||||
m_linePoints.reserve(numLines * 2);
|
||||
|
||||
Reference in New Issue
Block a user