summaryrefslogtreecommitdiff
path: root/src/plugins/renderers/opengl/debug/imguirenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/renderers/opengl/debug/imguirenderer.cpp')
-rw-r--r--src/plugins/renderers/opengl/debug/imguirenderer.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/plugins/renderers/opengl/debug/imguirenderer.cpp b/src/plugins/renderers/opengl/debug/imguirenderer.cpp
index 4a53117a0..6d52b515d 100644
--- a/src/plugins/renderers/opengl/debug/imguirenderer.cpp
+++ b/src/plugins/renderers/opengl/debug/imguirenderer.cpp
@@ -29,10 +29,6 @@
#define GL_VERTEX_ARRAY_BINDING 0x85B5
#endif
-#ifdef _MSC_VER
-#pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen
-#endif
-
QT_BEGIN_NAMESPACE
using namespace Qt3DRender;
@@ -162,7 +158,7 @@ void ImGuiRenderer::renderDebugOverlay(const std::vector<RenderView *> &renderVi
{
ImGui::Begin("Qt3D Profiling");
char caption[50];
- sprintf(caption, "Avg %.3f ms/frame (%.1f FPS)", static_cast<double>(1000.0f / ImGui::GetIO().Framerate), static_cast<double>(ImGui::GetIO().Framerate));
+ snprintf(caption, sizeof(caption), "Avg %.3f ms/frame (%.1f FPS)", static_cast<double>(1000.0f / ImGui::GetIO().Framerate), static_cast<double>(ImGui::GetIO().Framerate));
ImGui::PlotLines("FPS", m_fpsLog, logIndex + 1, 0, caption, m_fpsRange.first, m_fpsRange.second, ImVec2(0, 80));
ImGui::PlotHistogram("Jobs", m_jobsLog, logIndex + 1, 0, nullptr, m_jobsRange.first, m_jobsRange.second, ImVec2(0, 80));