Skip to content

Commit 8461bb9

Browse files
committed
Remove a few compiler warnings due to type conversions.
Many of those internal types need a cleanup later to consolidate them a bit more.
1 parent ceca33a commit 8461bb9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/libprojectM/ProjectM.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,16 +487,16 @@ auto ProjectM::GetRenderContext() -> RenderContext
487487
RenderContext ctx{};
488488
ctx.viewportSizeX = m_windowWidth;
489489
ctx.viewportSizeY = m_windowHeight;
490-
ctx.time = m_timeKeeper->GetRunningTime();
491-
ctx.progress = m_timeKeeper->PresetProgressA();
492-
ctx.fps = m_targetFps;
490+
ctx.time = static_cast<float>(m_timeKeeper->GetRunningTime());
491+
ctx.progress = static_cast<float>(m_timeKeeper->PresetProgressA());
492+
ctx.fps = static_cast<float>(m_targetFps);
493493
ctx.frame = m_frameCount;
494494
ctx.aspectX = (m_windowHeight > m_windowWidth) ? static_cast<float>(m_windowWidth) / static_cast<float>(m_windowHeight) : 1.0f;
495495
ctx.aspectY = (m_windowWidth > m_windowHeight) ? static_cast<float>(m_windowHeight) / static_cast<float>(m_windowWidth) : 1.0f;
496496
ctx.invAspectX = 1.0f / ctx.aspectX;
497497
ctx.invAspectY = 1.0f / ctx.aspectY;
498-
ctx.perPixelMeshX = m_meshX;
499-
ctx.perPixelMeshY = m_meshY;
498+
ctx.perPixelMeshX = static_cast<int>(m_meshX);
499+
ctx.perPixelMeshY = static_cast<int>(m_meshY);
500500
ctx.textureManager = m_textureManager.get();
501501

502502
return ctx;

0 commit comments

Comments
 (0)