Fixes clang cases

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
monroegm-disable-blank-issue-2
Esteban Papp 4 years ago
parent 6773af91bc
commit ec8e6bcadf

@ -236,10 +236,7 @@ QString CEditorCommandManager::Execute(const AZStd::string& module, const AZStd:
} }
else else
{ {
QString errMsg; CryLogAlways("Error: Trying to execute a unknown command, '%s'!", fullName.c_str());
errMsg = QStringLiteral("Error: Trying to execute a unknown command, '%1'!").arg(fullName.c_str());
CryLogAlways(errMsg.toUtf8().data());
} }
return ""; return "";
@ -272,10 +269,7 @@ QString CEditorCommandManager::Execute(const AZStd::string& cmdLine)
} }
else else
{ {
QString errMsg; CryLogAlways("Error: Trying to execute a unknown command, '%s'!", cmdLine.c_str());
errMsg = QStringLiteral("Error: Trying to execute a unknown command, '%1'!").arg(cmdLine.c_str());
CryLogAlways(errMsg.toUtf8().data());
} }
return ""; return "";
@ -294,10 +288,7 @@ void CEditorCommandManager::Execute(int commandId)
} }
else else
{ {
QString errMsg; CryLogAlways("Error: Trying to execute a unknown command of ID '%d'!", commandId);
errMsg = QStringLiteral("Error: Trying to execute a unknown command of ID '%1'!").arg(commandId);
CryLogAlways(errMsg.toUtf8().data());
} }
} }

@ -36,7 +36,7 @@ void CConsoleDialog::SetInfoText(const char* text)
{ {
if (gEnv && gEnv->pLog) // before log system was initialized if (gEnv && gEnv->pLog) // before log system was initialized
{ {
CryLogAlways(text); CryLogAlways("%s", text);
} }
} }

@ -67,7 +67,7 @@ SANDBOX_API void ErrorV(const char* format, va_list argList)
str += szBuffer; str += szBuffer;
//CLogFile::WriteLine( str ); //CLogFile::WriteLine( str );
CryWarning(VALIDATOR_MODULE_EDITOR, VALIDATOR_ERROR, str.toUtf8().data()); CryWarning(VALIDATOR_MODULE_EDITOR, VALIDATOR_ERROR, "%s", str.toUtf8().data());
if (!CCryEditApp::instance()->IsInTestMode() && !CCryEditApp::instance()->IsInExportMode() && !CCryEditApp::instance()->IsInLevelLoadTestMode()) if (!CCryEditApp::instance()->IsInTestMode() && !CCryEditApp::instance()->IsInExportMode() && !CCryEditApp::instance()->IsInLevelLoadTestMode())
{ {
@ -95,7 +95,7 @@ SANDBOX_API void WarningV(const char* format, va_list argList)
char szBuffer[MAX_LOGBUFFER_SIZE]; char szBuffer[MAX_LOGBUFFER_SIZE];
azvsnprintf(szBuffer, MAX_LOGBUFFER_SIZE, format, argList); azvsnprintf(szBuffer, MAX_LOGBUFFER_SIZE, format, argList);
CryWarning(VALIDATOR_MODULE_EDITOR, VALIDATOR_WARNING, szBuffer); CryWarning(VALIDATOR_MODULE_EDITOR, VALIDATOR_WARNING, "%s", szBuffer);
bool bNoUI = false; bool bNoUI = false;
ICVar* pCVar = gEnv->pConsole->GetCVar("sys_no_crash_dialog"); ICVar* pCVar = gEnv->pConsole->GetCVar("sys_no_crash_dialog");
@ -478,7 +478,7 @@ void CLogFile::WriteString(const char* pszString)
{ {
if (gEnv && gEnv->pLog) if (gEnv && gEnv->pLog)
{ {
gEnv->pLog->LogPlus(pszString); gEnv->pLog->LogPlus("%s", pszString);
} }
} }

@ -709,7 +709,7 @@ void CObjectManager::ShowDuplicationMsgWarning(CBaseObject* obj, const QString&
); );
// If id is taken. // If id is taken.
CryWarning(VALIDATOR_MODULE_EDITOR, VALIDATOR_WARNING, sRenameWarning.toUtf8().data()); CryWarning(VALIDATOR_MODULE_EDITOR, VALIDATOR_WARNING, "%s", sRenameWarning.toUtf8().data());
if (bShowMsgBox) if (bShowMsgBox)
{ {

@ -24,11 +24,9 @@ PLUGIN_API IPlugin* CreatePluginInstance(PLUGIN_INIT_PARAM* pInitParam)
// Make sure the ffmpeg command can be executed before registering the command // Make sure the ffmpeg command can be executed before registering the command
if (!CFFMPEGPlugin::RuntimeTest()) if (!CFFMPEGPlugin::RuntimeTest())
{ {
AZStd::string msg = GetIEditor()->GetSystem()->GetILog()->Log("FFMPEG plugin: Failed to execute FFmepg. Please run Setup Assistant, "
"FFMPEG plugin: Failed to execute FFmepg. Please run Setup Assistant, "
"go to the 'Optional software' section of the 'Install software' tab, " "go to the 'Optional software' section of the 'Install software' tab, "
"and make sure the FFmpeg executable is correctly configured."; "and make sure the FFmpeg executable is correctly configured.");
GetIEditor()->GetSystem()->GetILog()->Log(msg.c_str());
} }
else else
{ {

@ -313,7 +313,7 @@ namespace
{ {
if (strcmp(pMessage, "") != 0) if (strcmp(pMessage, "") != 0)
{ {
CryLogAlways(pMessage); CryLogAlways("%s", pMessage);
} }
} }

@ -92,8 +92,7 @@ namespace AzManipulatorTestFramework
{ {
if (m_logging) if (m_logging)
{ {
AZStd::string message = AZStd::string::format(format, args...); AZ_Printf("ActionDispatcher", format, args...);
AZ_Printf("[ActionDispatcher] %s", message.c_str());
} }
} }

@ -288,11 +288,11 @@ namespace AZ
continue; continue;
} }
ImGui::Text(statistics->m_groupName.c_str()); ImGui::Text("%s", statistics->m_groupName.c_str());
const ImVec2 topLeftBound = ImGui::GetItemRectMin(); const ImVec2 topLeftBound = ImGui::GetItemRectMin();
ImGui::TableNextColumn(); ImGui::TableNextColumn();
ImGui::Text(statistics->m_regionName.c_str()); ImGui::Text("%s", statistics->m_regionName.c_str());
ImGui::TableNextColumn(); ImGui::TableNextColumn();
ImGui::Text("%.2f", CpuProfilerImGuiHelper::TicksToMs(statistics->m_runningAverageTicks)); ImGui::Text("%.2f", CpuProfilerImGuiHelper::TicksToMs(statistics->m_runningAverageTicks));
@ -313,7 +313,7 @@ namespace AZ
if (ImGui::IsWindowHovered() && ImGui::IsMouseHoveringRect(topLeftBound, botRightBound, false)) if (ImGui::IsWindowHovered() && ImGui::IsMouseHoveringRect(topLeftBound, botRightBound, false))
{ {
ImGui::BeginTooltip(); ImGui::BeginTooltip();
ImGui::Text(statistics->GetExecutingThreadsLabel().c_str()); ImGui::Text("%s", statistics->GetExecutingThreadsLabel().c_str());
ImGui::EndTooltip(); ImGui::EndTooltip();
} }
} }
@ -363,7 +363,7 @@ namespace AZ
const auto ShowRow = [&ShowTimeInMs](const char* regionLabel, AZStd::sys_time_t duration) const auto ShowRow = [&ShowTimeInMs](const char* regionLabel, AZStd::sys_time_t duration)
{ {
ImGui::Text(regionLabel); ImGui::Text("%s", regionLabel);
ImGui::NextColumn(); ImGui::NextColumn();
ShowTimeInMs(duration); ShowTimeInMs(duration);

@ -279,13 +279,13 @@ namespace AZ
const AZStd::string totalPassCountLabel = AZStd::string::format("%s: %u", const AZStd::string totalPassCountLabel = AZStd::string::format("%s: %u",
"Total Pass Count", "Total Pass Count",
static_cast<uint32_t>(passEntryDatabase.size())); static_cast<uint32_t>(passEntryDatabase.size()));
ImGui::Text(totalPassCountLabel.c_str()); ImGui::Text("%s", totalPassCountLabel.c_str());
// Display listed pass count. // Display listed pass count.
const AZStd::string listedPassCountLabel = AZStd::string::format("%s: %u", const AZStd::string listedPassCountLabel = AZStd::string::format("%s: %u",
"Listed Pass Count", "Listed Pass Count",
static_cast<uint32_t>(m_passEntryReferences.size())); static_cast<uint32_t>(m_passEntryReferences.size()));
ImGui::Text(listedPassCountLabel.c_str()); ImGui::Text("%s", listedPassCountLabel.c_str());
} }
} }
@ -404,7 +404,7 @@ namespace AZ
passName = AZStd::string::format("%s (%s)", passName.c_str(), passTreeState); passName = AZStd::string::format("%s (%s)", passName.c_str(), passTreeState);
} }
ImGui::Text(passName.c_str()); ImGui::Text("%s", passName.c_str());
// Show a HoverMarker if the text is bigger than the column. // Show a HoverMarker if the text is bigger than the column.
const ImVec2 textSize = ImGui::CalcTextSize(passName.c_str()); const ImVec2 textSize = ImGui::CalcTextSize(passName.c_str());
@ -480,7 +480,7 @@ namespace AZ
} }
else else
{ {
ImGui::Text(label.c_str()); ImGui::Text("%s", label.c_str());
} }
if (textColorChanged) if (textColorChanged)
@ -683,7 +683,7 @@ namespace AZ
// Draw the frame time (GPU). // Draw the frame time (GPU).
const AZStd::string formattedTimestamp = FormatTimestampLabel(gpuTimestamp.GetDurationInNanoseconds()); const AZStd::string formattedTimestamp = FormatTimestampLabel(gpuTimestamp.GetDurationInNanoseconds());
const AZStd::string headerFrameTime = AZStd::string::format("Total frame duration (GPU): %s", formattedTimestamp.c_str()); const AZStd::string headerFrameTime = AZStd::string::format("Total frame duration (GPU): %s", formattedTimestamp.c_str());
ImGui::Text(headerFrameTime.c_str()); ImGui::Text("%s", headerFrameTime.c_str());
// Draw the viewing option. // Draw the viewing option.
ImGui::RadioButton("Hierarchical", reinterpret_cast<int32_t*>(&m_viewType), static_cast<int32_t>(ProfilerViewType::Hierarchical)); ImGui::RadioButton("Hierarchical", reinterpret_cast<int32_t*>(&m_viewType), static_cast<int32_t>(ProfilerViewType::Hierarchical));
@ -810,7 +810,7 @@ namespace AZ
{ {
const int32_t timestampMetricUnitNumeric = static_cast<int32_t>(m_timestampMetricUnit); const int32_t timestampMetricUnitNumeric = static_cast<int32_t>(m_timestampMetricUnit);
const AZStd::string metricUnitText = AZStd::string::format("Time in %s", MetricUnitText[timestampMetricUnitNumeric]); const AZStd::string metricUnitText = AZStd::string::format("Time in %s", MetricUnitText[timestampMetricUnitNumeric]);
ImGui::Text(metricUnitText.c_str()); ImGui::Text("%s", metricUnitText.c_str());
ImGui::NextColumn(); ImGui::NextColumn();
} }
@ -818,7 +818,7 @@ namespace AZ
{ {
const int32_t frameWorkloadViewNumeric = static_cast<int32_t>(m_frameWorkloadView); const int32_t frameWorkloadViewNumeric = static_cast<int32_t>(m_frameWorkloadView);
const AZStd::string frameWorkloadViewText = AZStd::string::format("Frame workload in %s FPS", FrameWorkloadUnit[frameWorkloadViewNumeric]); const AZStd::string frameWorkloadViewText = AZStd::string::format("Frame workload in %s FPS", FrameWorkloadUnit[frameWorkloadViewNumeric]);
ImGui::Text(frameWorkloadViewText.c_str()); ImGui::Text("%s", frameWorkloadViewText.c_str());
ImGui::NextColumn(); ImGui::NextColumn();
} }
@ -853,7 +853,7 @@ namespace AZ
const int32_t frameWorkloadViewNumeric = static_cast<int32_t>(m_frameWorkloadView); const int32_t frameWorkloadViewNumeric = static_cast<int32_t>(m_frameWorkloadView);
const AZStd::string frameWorkloadViewText = AZStd::string::format("Frame workload in %s FPS", FrameWorkloadUnit[frameWorkloadViewNumeric]); const AZStd::string frameWorkloadViewText = AZStd::string::format("Frame workload in %s FPS", FrameWorkloadUnit[frameWorkloadViewNumeric]);
ImGui::Text(frameWorkloadViewText.c_str()); ImGui::Text("%s", frameWorkloadViewText.c_str());
ImGui::NextColumn(); ImGui::NextColumn();
} }
@ -907,7 +907,7 @@ namespace AZ
} }
else else
{ {
ImGui::Text(entryTime.c_str()); ImGui::Text("%s", entryTime.c_str());
ImGui::NextColumn(); ImGui::NextColumn();
DrawFrameWorkloadBar(NormalizeFrameWorkload(entry->m_interpolatedTimestampInNanoseconds)); DrawFrameWorkloadBar(NormalizeFrameWorkload(entry->m_interpolatedTimestampInNanoseconds));
ImGui::NextColumn(); ImGui::NextColumn();
@ -927,7 +927,7 @@ namespace AZ
if (entry->m_children.empty()) if (entry->m_children.empty())
{ {
// Draw the workload bar when it doesn't have children. // Draw the workload bar when it doesn't have children.
ImGui::Text(entry->m_name.GetCStr()); ImGui::Text("%s", entry->m_name.GetCStr());
// Show a HoverMarker if the text is bigger than the column. // Show a HoverMarker if the text is bigger than the column.
createHoverMarker(entry->m_name.GetCStr()); createHoverMarker(entry->m_name.GetCStr());
@ -991,9 +991,9 @@ namespace AZ
} }
const AZStd::string entryTime = FormatTimestampLabel(entry->m_interpolatedTimestampInNanoseconds); const AZStd::string entryTime = FormatTimestampLabel(entry->m_interpolatedTimestampInNanoseconds);
ImGui::Text(entry->m_name.GetCStr()); ImGui::Text("%s", entry->m_name.GetCStr());
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::Text(entryTime.c_str()); ImGui::Text("%s", entryTime.c_str());
ImGui::NextColumn(); ImGui::NextColumn();
DrawFrameWorkloadBar(NormalizeFrameWorkload(entry->m_interpolatedTimestampInNanoseconds)); DrawFrameWorkloadBar(NormalizeFrameWorkload(entry->m_interpolatedTimestampInNanoseconds));
ImGui::NextColumn(); ImGui::NextColumn();
@ -1131,13 +1131,13 @@ namespace AZ
continue; continue;
} }
ImGui::Text(tableRow.m_parentPoolName.GetCStr()); ImGui::Text("%s", tableRow.m_parentPoolName.GetCStr());
ImGui::TableNextColumn(); ImGui::TableNextColumn();
ImGui::Text(tableRow.m_bufImgName.GetCStr()); ImGui::Text("%s", tableRow.m_bufImgName.GetCStr());
ImGui::TableNextColumn(); ImGui::TableNextColumn();
ImGui::Text("%.4f", 1.0f * tableRow.m_sizeInBytes / GpuProfilerImGuiHelper::MB); ImGui::Text("%.4f", 1.0f * tableRow.m_sizeInBytes / GpuProfilerImGuiHelper::MB);
ImGui::TableNextColumn(); ImGui::TableNextColumn();
ImGui::Text(tableRow.m_bindFlags.c_str()); ImGui::Text("%s", tableRow.m_bindFlags.c_str());
ImGui::TableNextColumn(); ImGui::TableNextColumn();
} }
} }
@ -1244,20 +1244,20 @@ namespace AZ
{ {
if (ImGui::BeginChild(savedHeap.m_name.GetCStr(), { ImGui::GetWindowWidth() / m_savedHeaps.size(), 250 }), ImGuiWindowFlags_NoScrollbar) if (ImGui::BeginChild(savedHeap.m_name.GetCStr(), { ImGui::GetWindowWidth() / m_savedHeaps.size(), 250 }), ImGuiWindowFlags_NoScrollbar)
{ {
ImGui::Text(savedHeap.m_name.GetCStr()); ImGui::Text("%s", savedHeap.m_name.GetCStr());
ImGui::Columns(2, "HeapData", true); ImGui::Columns(2, "HeapData", true);
ImGui::Text("Resident (MB): "); ImGui::Text("%s", "Resident (MB): ");
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::Text("%.2f", 1.0 * savedHeap.m_memoryUsage.m_residentInBytes.load() / GpuProfilerImGuiHelper::MB); ImGui::Text("%.2f", 1.0 * savedHeap.m_memoryUsage.m_residentInBytes.load() / GpuProfilerImGuiHelper::MB);
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::Text("Reserved (MB): "); ImGui::Text("%s", "Reserved (MB): ");
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::Text("%.2f", 1.0 * savedHeap.m_memoryUsage.m_reservedInBytes.load() / GpuProfilerImGuiHelper::MB); ImGui::Text("%.2f", 1.0 * savedHeap.m_memoryUsage.m_reservedInBytes.load() / GpuProfilerImGuiHelper::MB);
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::Text("Budget (MB): "); ImGui::Text("%s", "Budget (MB): ");
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::Text("%.2f", 1.0 * savedHeap.m_memoryUsage.m_budgetInBytes / GpuProfilerImGuiHelper::MB); ImGui::Text("%.2f", 1.0 * savedHeap.m_memoryUsage.m_budgetInBytes / GpuProfilerImGuiHelper::MB);

@ -100,7 +100,7 @@ namespace AZ::Render
} }
} }
ImGui::TextWrapped(m_attachmentReadbackInfo.c_str()); ImGui::TextWrapped("%s", m_attachmentReadbackInfo.c_str());
} }
if (m_previewAttachment && m_selectedChanged) if (m_previewAttachment && m_selectedChanged)
@ -211,7 +211,7 @@ namespace AZ::Render
else else
{ {
// Only draw text (not selectable) if there is no attachment binded to the slot. // Only draw text (not selectable) if there is no attachment binded to the slot.
ImGui::Text(label.c_str()); ImGui::Text("%s", label.c_str());
} }
} }

@ -61,7 +61,7 @@ namespace AZ
ImGui::Text("%d", request.m_requestCount); ImGui::Text("%d", request.m_requestCount);
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::Text(request.m_shaderName.GetCStr()); ImGui::Text("%s", request.m_shaderName.GetCStr());
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::Text("%d", request.m_shaderVariantStableId.GetIndex()); ImGui::Text("%d", request.m_shaderVariantStableId.GetIndex());

@ -19,6 +19,8 @@ set(FILES
Include/Atom/Utils/ImGuiPassTree.inl Include/Atom/Utils/ImGuiPassTree.inl
Include/Atom/Utils/ImGuiFrameVisualizer.h Include/Atom/Utils/ImGuiFrameVisualizer.h
Include/Atom/Utils/ImGuiFrameVisualizer.inl Include/Atom/Utils/ImGuiFrameVisualizer.inl
Include/Atom/Utils/ImGuiShaderMetrics.h
Include/Atom/Utils/ImGuiShaderMetrics.inl
Include/Atom/Utils/ImGuiTransientAttachmentProfiler.h Include/Atom/Utils/ImGuiTransientAttachmentProfiler.h
Include/Atom/Utils/ImGuiTransientAttachmentProfiler.inl Include/Atom/Utils/ImGuiTransientAttachmentProfiler.inl
Include/Atom/Utils/PpmFile.h Include/Atom/Utils/PpmFile.h

@ -731,20 +731,14 @@ IFFont* AZ::AtomFont::LoadFont(const char* fontName)
font = NewFont(fontNameLower.c_str()); font = NewFont(fontNameLower.c_str());
if (!font) if (!font)
{ {
AZStd::string errorMsg = "Error creating a new font named "; CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_ERROR, "Error creating a new font named %s.", fontNameLower.c_str());
errorMsg += fontNameLower;
errorMsg += ".";
CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_ERROR, errorMsg.c_str());
} }
else else
{ {
// creating font adds one to its refcount so no need for AddRef here // creating font adds one to its refcount so no need for AddRef here
if (!font->Load(fontNameLower.c_str())) if (!font->Load(fontNameLower.c_str()))
{ {
AZStd::string errorMsg = "Error loading a font from "; CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_ERROR, "Error loading a font from %s.", fontNameLower.c_str());
errorMsg += fontNameLower;
errorMsg += ".";
CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_ERROR, errorMsg.c_str());
font->Release(); font->Release();
font = nullptr; font = nullptr;
} }
@ -792,8 +786,7 @@ bool AZ::AtomFont::AddFontFamilyToMaps(const char* fontFamilyFilename, const cha
AZStd::to_lower<AZStd::string::iterator>(loweredFilename.begin(), loweredFilename.end()); AZStd::to_lower<AZStd::string::iterator>(loweredFilename.begin(), loweredFilename.end());
if (m_fontFamilies.find(loweredFilename) != m_fontFamilies.end()) if (m_fontFamilies.find(loweredFilename) != m_fontFamilies.end())
{ {
AZStd::string warnMsg = AZStd::string::format("Couldn't load Font Family '%s': already loaded", fontFamilyFilename); CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_WARNING, "Couldn't load Font Family '%s': already loaded", fontFamilyFilename);
CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_WARNING, warnMsg.c_str());
return false; return false;
} }
@ -803,8 +796,7 @@ bool AZ::AtomFont::AddFontFamilyToMaps(const char* fontFamilyFilename, const cha
AZStd::to_lower<AZStd::string::iterator>(loweredFontFamilyName.begin(), loweredFontFamilyName.end()); AZStd::to_lower<AZStd::string::iterator>(loweredFontFamilyName.begin(), loweredFontFamilyName.end());
if (m_fontFamilies.find(loweredFontFamilyName) != m_fontFamilies.end()) if (m_fontFamilies.find(loweredFontFamilyName) != m_fontFamilies.end())
{ {
AZStd::string warnMsg = AZStd::string::format("Couldn't load Font Family '%s': already loaded", fontFamilyName); CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_WARNING, "Couldn't load Font Family '%s': already loaded", fontFamilyName);
CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_WARNING, warnMsg.c_str());
return false; return false;
} }

@ -311,8 +311,7 @@ Vec2 AZ::FontRenderer::GetKerning(uint32_t leftGlyph, uint32_t rightGlyph)
#if !defined(_RELEASE) #if !defined(_RELEASE)
if (0 != ftError) if (0 != ftError)
{ {
AZStd::string warnMsg = AZStd::string::format("FT_Get_Kerning returned %d", ftError); CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_WARNING, "FT_Get_Kerning returned %d", ftError);
CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_WARNING, warnMsg.c_str());
} }
#endif #endif
} }

@ -2170,25 +2170,15 @@ namespace Audio
const AZ::Color yellowColor(colorMax, colorMax, colorMin, 0.9f); const AZ::Color yellowColor(colorMax, colorMax, colorMin, 0.9f);
const AZ::Color redColor(colorMax, colorMin, 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; float posY = fPosY;
constexpr float xTablePositions[7] = { 0.f, 40.f, 300.f, 400.f, 500.f, 600.f, 700.f };
// Draw the header info: auxGeom.Draw2dLabel(fPosX + xTablePositions[0], posY, textSize, color, false, "ID");
for (int column = 0; column < numColumns; ++column) 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[column], posY, textSize, color, false, tableHeaderNames[column]); 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... // Get the memory pool information...
AZStd::vector<AudioImplMemoryPoolInfo> poolInfos; AZStd::vector<AudioImplMemoryPoolInfo> poolInfos;
@ -2232,15 +2222,15 @@ namespace Audio
auxGeom.Draw2dLabel(fPosX + xTablePositions[0], posY, textSize, color, false, "%d", poolInfo.m_poolId); auxGeom.Draw2dLabel(fPosX + xTablePositions[0], posY, textSize, color, false, "%d", poolInfo.m_poolId);
// Name // 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) // Current Used (bytes)
BytesToString(poolInfo.m_memoryUsed, buffer, bufferSize); 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) // Peak Used (bytes)
BytesToString(poolInfo.m_peakUsed, buffer, bufferSize); 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) // % of Used (percent)
auxGeom.Draw2dLabel(fPosX + xTablePositions[4], posY, textSize, color, false, "%.1f %%", percentUsed); auxGeom.Draw2dLabel(fPosX + xTablePositions[4], posY, textSize, color, false, "%.1f %%", percentUsed);
@ -2255,20 +2245,20 @@ namespace Audio
whiteColor.StoreToFloat4(color); whiteColor.StoreToFloat4(color);
posY += (2.f * lineHeight); posY += (2.f * lineHeight);
auxGeom.Draw2dLabel(fPosX + xTablePositions[1], posY, textSize, color, false, tableHeaderNames[1]); auxGeom.Draw2dLabel(fPosX + xTablePositions[1], posY, textSize, color, false, "Name");
auxGeom.Draw2dLabel(fPosX + xTablePositions[1], posY + lineHeight, textSize, color, false, globalInfo.m_poolName); 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"); auxGeom.Draw2dLabel(fPosX + xTablePositions[2], posY, textSize, color, false, "Total Used");
BytesToString(globalInfo.m_memoryUsed, buffer, bufferSize); 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"); auxGeom.Draw2dLabel(fPosX + xTablePositions[3], posY, textSize, color, false, "Total Peak");
BytesToString(totalPeak, buffer, bufferSize); 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"); auxGeom.Draw2dLabel(fPosX + xTablePositions[4], posY, textSize, color, false, "Total Size");
BytesToString(globalInfo.m_memoryReserved, buffer, bufferSize); 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, textSize, color, false, "Total Allocs");
auxGeom.Draw2dLabel(fPosX + xTablePositions[5], posY + lineHeight, textSize, color, false, "%" PRIu64, totalAllocs); auxGeom.Draw2dLabel(fPosX + xTablePositions[5], posY + lineHeight, textSize, color, false, "%" PRIu64, totalAllocs);

@ -446,13 +446,13 @@ namespace Audio
} }
// Format: "relative/path/filename.ext (230 KiB) [2]" // Format: "relative/path/filename.ext (230 KiB) [2]"
AZStd::string displayString = AZStd::string::format("%s (%zu %s) [%zu]", auxGeom.Draw2dLabel(positionX, positionY, entryDrawSize, color, false,
"%s (%zu %s) [%zu]",
audioFileEntry->m_filePath.c_str(), audioFileEntry->m_filePath.c_str(),
fileSize, fileSize,
kiloBytes ? "KiB" : "Bytes", kiloBytes ? "KiB" : "Bytes",
audioFileEntry->m_useCount); audioFileEntry->m_useCount);
auxGeom.Draw2dLabel(positionX, positionY, entryDrawSize, color, false, displayString.c_str());
color[3] = originalAlpha; color[3] = originalAlpha;
positionY += entryStepSize; positionY += entryStepSize;
} }

@ -84,99 +84,99 @@ namespace ImGui
ImGui::Columns(3); ImGui::Columns(3);
ImGui::TextColored(m_displayName.m_color, "Display Name"); ImGui::TextColored(m_displayName.m_color, "Display Name");
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::Checkbox("##DisplayNameCB", &m_displayName.m_enabled); ImGui::Checkbox("##DisplayNameCB", &m_displayName.m_enabled);
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::ColorEdit4("##DisplayNameCol", reinterpret_cast<float*>(&m_displayName.m_color)); ImGui::ColorEdit4("##DisplayNameCol", reinterpret_cast<float*>(&m_displayName.m_color));
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(m_displayChildCount.m_color, "Display Child Count"); ImGui::TextColored(m_displayChildCount.m_color, "Display Child Count");
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::Checkbox("##DisplayChildCountCB", &m_displayChildCount.m_enabled); ImGui::Checkbox("##DisplayChildCountCB", &m_displayChildCount.m_enabled);
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::ColorEdit4("##DisplayChildCountCol", reinterpret_cast<float*>(&m_displayChildCount.m_color)); ImGui::ColorEdit4("##DisplayChildCountCol", reinterpret_cast<float*>(&m_displayChildCount.m_color));
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(m_displayDescentdantCount.m_color, "Display Descendant Count"); ImGui::TextColored(m_displayDescentdantCount.m_color, "Display Descendant Count");
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::Checkbox("##DisplayDescendantCountCB", &m_displayDescentdantCount.m_enabled); ImGui::Checkbox("##DisplayDescendantCountCB", &m_displayDescentdantCount.m_enabled);
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::ColorEdit4("##DisplayDescendantCountCol", reinterpret_cast<float*>(&m_displayDescentdantCount.m_color)); ImGui::ColorEdit4("##DisplayDescendantCountCol", reinterpret_cast<float*>(&m_displayDescentdantCount.m_color));
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(m_displayEntityState.m_color, "Display Entity Status"); ImGui::TextColored(m_displayEntityState.m_color, "Display Entity Status");
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::Checkbox("##DisplayEntityStateCB", &m_displayEntityState.m_enabled); ImGui::Checkbox("##DisplayEntityStateCB", &m_displayEntityState.m_enabled);
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::ColorEdit4("##DisplayEntityStateCol", reinterpret_cast<float*>(&m_displayEntityState.m_color)); ImGui::ColorEdit4("##DisplayEntityStateCol", reinterpret_cast<float*>(&m_displayEntityState.m_color));
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(m_displayParentInfo.m_color, "Display Parent Info"); ImGui::TextColored(m_displayParentInfo.m_color, "Display Parent Info");
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::Checkbox("##DisplayParentInfoCB", &m_displayParentInfo.m_enabled); ImGui::Checkbox("##DisplayParentInfoCB", &m_displayParentInfo.m_enabled);
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::ColorEdit4("##DisplayParentInfoCol", reinterpret_cast<float*>(&m_displayParentInfo.m_color)); ImGui::ColorEdit4("##DisplayParentInfoCol", reinterpret_cast<float*>(&m_displayParentInfo.m_color));
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(m_displayLocalPos.m_color, "Display Local Position"); ImGui::TextColored(m_displayLocalPos.m_color, "Display Local Position");
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::Checkbox("##DisplayLocalPosCB", &m_displayLocalPos.m_enabled); ImGui::Checkbox("##DisplayLocalPosCB", &m_displayLocalPos.m_enabled);
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::ColorEdit4("##DisplayLocalPosCol", reinterpret_cast<float*>(&m_displayLocalPos.m_color)); ImGui::ColorEdit4("##DisplayLocalPosCol", reinterpret_cast<float*>(&m_displayLocalPos.m_color));
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(m_displayLocalRotation.m_color, "Display Local Rotation"); ImGui::TextColored(m_displayLocalRotation.m_color, "Display Local Rotation");
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::Checkbox("##DisplayLocalRotationCB", &m_displayLocalRotation.m_enabled); ImGui::Checkbox("##DisplayLocalRotationCB", &m_displayLocalRotation.m_enabled);
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::ColorEdit4("##DisplayLocalRotationCol", reinterpret_cast<float*>(&m_displayLocalRotation.m_color)); ImGui::ColorEdit4("##DisplayLocalRotationCol", reinterpret_cast<float*>(&m_displayLocalRotation.m_color));
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(m_displayWorldPos.m_color, "Display World Position"); ImGui::TextColored(m_displayWorldPos.m_color, "Display World Position");
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::Checkbox("##DisplayWorldPosCB", &m_displayWorldPos.m_enabled); ImGui::Checkbox("##DisplayWorldPosCB", &m_displayWorldPos.m_enabled);
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::ColorEdit4("##DisplayWorldPosCol", reinterpret_cast<float*>(&m_displayWorldPos.m_color)); ImGui::ColorEdit4("##DisplayWorldPosCol", reinterpret_cast<float*>(&m_displayWorldPos.m_color));
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(m_displayWorldRotation.m_color, "Display World Rotation"); ImGui::TextColored(m_displayWorldRotation.m_color, "Display World Rotation");
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::Checkbox("##DisplayWorldRotationCB", &m_displayWorldRotation.m_enabled); ImGui::Checkbox("##DisplayWorldRotationCB", &m_displayWorldRotation.m_enabled);
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
ImGui::SameLine(); ImGui::SameLine();
ImGui::ColorEdit4("##DisplayWorldRotationCol", reinterpret_cast<float*>(&m_displayWorldRotation.m_color)); ImGui::ColorEdit4("##DisplayWorldRotationCol", reinterpret_cast<float*>(&m_displayWorldRotation.m_color));
@ -508,7 +508,7 @@ namespace ImGui
} }
else if (sameLine) else if (sameLine)
{ {
if (ImGui::TreeNode(childTreeNodeStr.c_str(), childTreeNodeStr.c_str())) if (ImGui::TreeNode(childTreeNodeStr.c_str(), "%s", childTreeNodeStr.c_str()))
{ {
ImGuiUpdate_RecursivelyDisplayEntityInfoAndDecendants_DrawDisplayOptions(node, drawInspectButton, drawTargetButton, drawDebugButton, sameLine, drawComponents); ImGuiUpdate_RecursivelyDisplayEntityInfoAndDecendants_DrawDisplayOptions(node, drawInspectButton, drawTargetButton, drawDebugButton, sameLine, drawComponents);
@ -528,7 +528,7 @@ namespace ImGui
{ {
ImGuiUpdate_RecursivelyDisplayEntityInfoAndDecendants_DrawDisplayOptions(node, drawInspectButton, drawTargetButton, drawDebugButton, sameLine, drawComponents); ImGuiUpdate_RecursivelyDisplayEntityInfoAndDecendants_DrawDisplayOptions(node, drawInspectButton, drawTargetButton, drawDebugButton, sameLine, drawComponents);
childTreeNodeStr = AZStd::string::format("Children ##%s", childTreeNodeStr.c_str()); childTreeNodeStr = AZStd::string::format("Children ##%s", childTreeNodeStr.c_str());
if (ImGui::TreeNode(childTreeNodeStr.c_str(), childTreeNodeStr.c_str())) if (ImGui::TreeNode(childTreeNodeStr.c_str(), "%s", childTreeNodeStr.c_str()))
{ {
for (int i = 0; i < node->m_children.size(); i++) for (int i = 0; i < node->m_children.size(); i++)
{ {
@ -542,7 +542,7 @@ namespace ImGui
else if (!justDrawChildren) else if (!justDrawChildren)
{ {
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "->"); ImGui::SameLine(); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "->"); ImGui::SameLine();
ImGui::Text(childTreeNodeStr.c_str()); ImGui::Text("%s", childTreeNodeStr.c_str());
ImGuiUpdate_RecursivelyDisplayEntityInfoAndDecendants_DrawDisplayOptions(node, drawInspectButton, drawTargetButton, drawDebugButton, sameLine, drawComponents); ImGuiUpdate_RecursivelyDisplayEntityInfoAndDecendants_DrawDisplayOptions(node, drawInspectButton, drawTargetButton, drawDebugButton, sameLine, drawComponents);
} }
} }
@ -561,7 +561,7 @@ namespace ImGui
{ {
ImGui::SameLine(); ImGui::SameLine();
} }
ImGui::TextColored(m_displayName.m_color, entityName.c_str()); ImGui::TextColored(m_displayName.m_color, "%s", entityName.c_str());
} }
// Draw EntityViewer Button // Draw EntityViewer Button
@ -762,7 +762,7 @@ namespace ImGui
{ {
// Draw collapsible menu for the components set // Draw collapsible menu for the components set
AZStd::string uiLabel = AZStd::string::format("Components##%s", node->m_entityId.ToString().c_str()); AZStd::string uiLabel = AZStd::string::format("Components##%s", node->m_entityId.ToString().c_str());
if (ImGui::TreeNode(uiLabel.c_str(), uiLabel.c_str())) if (ImGui::TreeNode(uiLabel.c_str(), "%s", uiLabel.c_str()))
{ {
AZ::Entity::ComponentArrayType components = entity->GetComponents(); AZ::Entity::ComponentArrayType components = entity->GetComponents();
// we should sort our array of components based on their names. // we should sort our array of components based on their names.
@ -781,7 +781,7 @@ namespace ImGui
bool hasDebug = ComponentHasDebug(component->RTTI_GetType()); bool hasDebug = ComponentHasDebug(component->RTTI_GetType());
// Draw a collapsible menu for each component // Draw a collapsible menu for each component
uiLabel = AZStd::string::format("%s##%s", component->RTTI_GetTypeName(), node->m_entityId.ToString().c_str()); uiLabel = AZStd::string::format("%s##%s", component->RTTI_GetTypeName(), node->m_entityId.ToString().c_str());
if (ImGui::TreeNode(uiLabel.c_str(), uiLabel.c_str())) if (ImGui::TreeNode(uiLabel.c_str(), "%s", uiLabel.c_str()))
{ {
if (hasDebug) if (hasDebug)
{ {
@ -795,7 +795,7 @@ namespace ImGui
// Draw a collapsible menu for all Reflected Properties // Draw a collapsible menu for all Reflected Properties
uiLabel = AZStd::string::format("Reflected Properties##%s", node->m_entityId.ToString().c_str()); uiLabel = AZStd::string::format("Reflected Properties##%s", node->m_entityId.ToString().c_str());
if (ImGui::TreeNode(uiLabel.c_str(), uiLabel.c_str())) if (ImGui::TreeNode(uiLabel.c_str(), "%s", uiLabel.c_str()))
{ {
AZ::SerializeContext *serializeContext = nullptr; AZ::SerializeContext *serializeContext = nullptr;
AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext);
@ -820,7 +820,7 @@ namespace ImGui
if (hasDebug) if (hasDebug)
{ {
uiLabel = AZStd::string::format("Debug##%s", node->m_entityId.ToString().c_str()); uiLabel = AZStd::string::format("Debug##%s", node->m_entityId.ToString().c_str());
if (ImGui::TreeNode(uiLabel.c_str(), uiLabel.c_str())) if (ImGui::TreeNode(uiLabel.c_str(), "%s", uiLabel.c_str()))
{ {
// Attempt to draw any debug information for this component // Attempt to draw any debug information for this component
ImGuiUpdateDebugComponentListenerBus::Event(ImGuiEntComponentId(node->m_entityId, component->RTTI_GetType()) ImGuiUpdateDebugComponentListenerBus::Event(ImGuiEntComponentId(node->m_entityId, component->RTTI_GetType())

@ -256,20 +256,12 @@ const AZ::SerializeContext::ClassElement* CUiAnimAzEntityNode::ComputeOffsetFrom
if (mismatch) if (mismatch)
{ {
AZStd::string warnMsg = "Data mismatch reading animation data for type "; CryWarning(VALIDATOR_MODULE_SHINE, VALIDATOR_WARNING,
warnMsg += classData->m_typeId.ToString<AZStd::string>(); "Data mismatch reading animation data for type %s. The field \"%s\" %s. This part of the animation data will be ignored.",
warnMsg += ". The field \""; classData->m_typeId.ToString<AZStd::string>().c_str(),
warnMsg += paramData.GetName(); paramData.GetName(),
if (!element) (!element ? "cannot be found" : "has a different type to that in the animation data")
{ );
warnMsg += "\" cannot be found.";
}
else
{
warnMsg += "\" has a different type to that in the animation data.";
}
warnMsg += " This part of the animation data will be ignored.";
CryWarning(VALIDATOR_MODULE_SHINE, VALIDATOR_WARNING, warnMsg.c_str());
return nullptr; return nullptr;
} }
} }

@ -575,10 +575,7 @@ void UiInteractableStateFont::SetFontPathname(const AZStd::string& pathname)
fontFamily = gEnv->pCryFont->LoadFontFamily(fileName.c_str()); fontFamily = gEnv->pCryFont->LoadFontFamily(fileName.c_str());
if (!fontFamily) if (!fontFamily)
{ {
AZStd::string errorMsg = "Error loading a font from "; CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_ERROR, "Error loading a font from %s.", fileName.c_str());
errorMsg += fileName.c_str();
errorMsg += ".";
CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_ERROR, errorMsg.c_str());
} }
} }

Loading…
Cancel
Save