Fixes clang cases

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-09-03 13:27:31 -07:00
parent 6773af91bc
commit ec8e6bcadf
19 changed files with 96 additions and 136 deletions
+16 -26
View File
@@ -2170,25 +2170,15 @@ namespace Audio
const AZ::Color yellowColor(colorMax, colorMax, colorMin, 0.9f);
const AZ::Color redColor(colorMax, colorMin, colorMin, 0.9f);
constexpr const char* tableHeaderNames[] = {
"ID",
"Name",
"Curr Used",
"Peak Used",
"%% of Used",
"Allocs",
"Frees",
};
constexpr size_t numColumns = AZStd::size(tableHeaderNames);
constexpr float xTablePositions[numColumns] = { 0.f, 40.f, 300.f, 400.f, 500.f, 600.f, 700.f };
float posY = fPosY;
// Draw the header info:
for (int column = 0; column < numColumns; ++column)
{
auxGeom.Draw2dLabel(fPosX + xTablePositions[column], posY, textSize, color, false, tableHeaderNames[column]);
}
constexpr float xTablePositions[7] = { 0.f, 40.f, 300.f, 400.f, 500.f, 600.f, 700.f };
auxGeom.Draw2dLabel(fPosX + xTablePositions[0], posY, textSize, color, false, "ID");
auxGeom.Draw2dLabel(fPosX + xTablePositions[1], posY, textSize, color, false, "Name");
auxGeom.Draw2dLabel(fPosX + xTablePositions[2], posY, textSize, color, false, "Curr Used");
auxGeom.Draw2dLabel(fPosX + xTablePositions[3], posY, textSize, color, false, "Peak Used");
auxGeom.Draw2dLabel(fPosX + xTablePositions[4], posY, textSize, color, false, "%% of Used");
auxGeom.Draw2dLabel(fPosX + xTablePositions[5], posY, textSize, color, false, "Allocs");
auxGeom.Draw2dLabel(fPosX + xTablePositions[6], posY, textSize, color, false, "Frees");
// Get the memory pool information...
AZStd::vector<AudioImplMemoryPoolInfo> poolInfos;
@@ -2232,15 +2222,15 @@ namespace Audio
auxGeom.Draw2dLabel(fPosX + xTablePositions[0], posY, textSize, color, false, "%d", poolInfo.m_poolId);
// Name
auxGeom.Draw2dLabel(fPosX + xTablePositions[1], posY, textSize, color, false, poolInfo.m_poolName);
auxGeom.Draw2dLabel(fPosX + xTablePositions[1], posY, textSize, color, false, "%s", poolInfo.m_poolName);
// Current Used (bytes)
BytesToString(poolInfo.m_memoryUsed, buffer, bufferSize);
auxGeom.Draw2dLabel(fPosX + xTablePositions[2], posY, textSize, color, false, buffer);
auxGeom.Draw2dLabel(fPosX + xTablePositions[2], posY, textSize, color, false, "%s", buffer);
// Peak Used (bytes)
BytesToString(poolInfo.m_peakUsed, buffer, bufferSize);
auxGeom.Draw2dLabel(fPosX + xTablePositions[3], posY, textSize, color, false, buffer);
auxGeom.Draw2dLabel(fPosX + xTablePositions[3], posY, textSize, color, false, "%s", buffer);
// % of Used (percent)
auxGeom.Draw2dLabel(fPosX + xTablePositions[4], posY, textSize, color, false, "%.1f %%", percentUsed);
@@ -2255,20 +2245,20 @@ namespace Audio
whiteColor.StoreToFloat4(color);
posY += (2.f * lineHeight);
auxGeom.Draw2dLabel(fPosX + xTablePositions[1], posY, textSize, color, false, tableHeaderNames[1]);
auxGeom.Draw2dLabel(fPosX + xTablePositions[1], posY + lineHeight, textSize, color, false, globalInfo.m_poolName);
auxGeom.Draw2dLabel(fPosX + xTablePositions[1], posY, textSize, color, false, "Name");
auxGeom.Draw2dLabel(fPosX + xTablePositions[1], posY + lineHeight, textSize, color, false, "%s", globalInfo.m_poolName);
auxGeom.Draw2dLabel(fPosX + xTablePositions[2], posY, textSize, color, false, "Total Used");
BytesToString(globalInfo.m_memoryUsed, buffer, bufferSize);
auxGeom.Draw2dLabel(fPosX + xTablePositions[2], posY + lineHeight, textSize, color, false, buffer);
auxGeom.Draw2dLabel(fPosX + xTablePositions[2], posY + lineHeight, textSize, color, false, "%s", buffer);
auxGeom.Draw2dLabel(fPosX + xTablePositions[3], posY, textSize, color, false, "Total Peak");
BytesToString(totalPeak, buffer, bufferSize);
auxGeom.Draw2dLabel(fPosX + xTablePositions[3], posY + lineHeight, textSize, color, false, buffer);
auxGeom.Draw2dLabel(fPosX + xTablePositions[3], posY + lineHeight, textSize, color, false, "%s", buffer);
auxGeom.Draw2dLabel(fPosX + xTablePositions[4], posY, textSize, color, false, "Total Size");
BytesToString(globalInfo.m_memoryReserved, buffer, bufferSize);
auxGeom.Draw2dLabel(fPosX + xTablePositions[4], posY + lineHeight, textSize, color, false, buffer);
auxGeom.Draw2dLabel(fPosX + xTablePositions[4], posY + lineHeight, textSize, color, false, "%s", buffer);
auxGeom.Draw2dLabel(fPosX + xTablePositions[5], posY, textSize, color, false, "Total Allocs");
auxGeom.Draw2dLabel(fPosX + xTablePositions[5], posY + lineHeight, textSize, color, false, "%" PRIu64, totalAllocs);