From 8461bb958634d3f3529f7eb1403fdcbb9a89ef74 Mon Sep 17 00:00:00 2001 From: Kai Blaschke Date: Sat, 14 Oct 2023 13:53:41 +0200 Subject: [PATCH] Remove a few compiler warnings due to type conversions. Many of those internal types need a cleanup later to consolidate them a bit more. --- src/libprojectM/ProjectM.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libprojectM/ProjectM.cpp b/src/libprojectM/ProjectM.cpp index 31d2d5eb3..31273c65a 100644 --- a/src/libprojectM/ProjectM.cpp +++ b/src/libprojectM/ProjectM.cpp @@ -487,16 +487,16 @@ auto ProjectM::GetRenderContext() -> RenderContext RenderContext ctx{}; ctx.viewportSizeX = m_windowWidth; ctx.viewportSizeY = m_windowHeight; - ctx.time = m_timeKeeper->GetRunningTime(); - ctx.progress = m_timeKeeper->PresetProgressA(); - ctx.fps = m_targetFps; + ctx.time = static_cast(m_timeKeeper->GetRunningTime()); + ctx.progress = static_cast(m_timeKeeper->PresetProgressA()); + ctx.fps = static_cast(m_targetFps); ctx.frame = m_frameCount; ctx.aspectX = (m_windowHeight > m_windowWidth) ? static_cast(m_windowWidth) / static_cast(m_windowHeight) : 1.0f; ctx.aspectY = (m_windowWidth > m_windowHeight) ? static_cast(m_windowHeight) / static_cast(m_windowWidth) : 1.0f; ctx.invAspectX = 1.0f / ctx.aspectX; ctx.invAspectY = 1.0f / ctx.aspectY; - ctx.perPixelMeshX = m_meshX; - ctx.perPixelMeshY = m_meshY; + ctx.perPixelMeshX = static_cast(m_meshX); + ctx.perPixelMeshY = static_cast(m_meshY); ctx.textureManager = m_textureManager.get(); return ctx;