Fix a few warnings

This commit is contained in:
Tamás Bálint Misius
2024-07-06 12:03:44 +02:00
parent 1854bc25f0
commit 57f6ea5953
3 changed files with 3 additions and 3 deletions

View File

@@ -847,7 +847,7 @@ void Renderer::draw_grav()
{
continue;
}
auto np = Vec2<float>(p.X * CELL, p.Y * CELL);
auto np = Vec2{ float(p.X * CELL), float(p.Y * CELL) };
auto dist = agx + agy;
for (auto i = 0; i < 4; ++i)
{

View File

@@ -81,7 +81,7 @@ void ScrollPanel::XOnMouseDown(int x, int y, unsigned int button)
scrollbarSelected = true;
scrollbarInitialYOffset = int(offsetY);
}
initialOffsetY = offsetY;
initialOffsetY = int(offsetY);
scrollbarInitialYClick = y - Position.Y;
scrollbarClickLocation = 100;
}

View File

@@ -179,7 +179,7 @@ void GravityImpl::Init()
fftwf_execute(kernelYForward.get());
//clear padded gravmap
std::memset(massBig.get(), 0.f, blocks.X * blocks.Y * sizeof(float));
std::fill(massBig.get(), massBig.get() + blocks.X * blocks.Y, 0.f);
thr = std::thread([this]() {
while (true)