17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-18 16:09:19 +02:00

refactor(sonar): make narrowing conversions explicit (cpp:S5276)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jerrrrycho
2026-10-10 15:16:28 +02:00
parent 80464d0bc1
commit 8c23c1fe2b
53 changed files with 468 additions and 468 deletions

View File

@@ -49,7 +49,7 @@ void perfgraph_panel::render_contents() {
if (!stopwatch)
return;
history[pos] = stopwatch->last().count() / 1000.0;
history[pos] = static_cast<float>(static_cast<double>(stopwatch->last().count()) / 1000.0);
const std::string label = std::to_string(history[pos]) + "ms";
pos++;
@@ -57,5 +57,5 @@ void perfgraph_panel::render_contents() {
pos = 0;
ImGui::SliderFloat(STR_C("Range"), &max, 0.1f, 250.0f);
ImGui::PlotLines("##timer", &history[0], history.size(), pos, label.c_str(), 0.0f, max, ImVec2(500, 200));
ImGui::PlotLines("##timer", &history[0], static_cast<int>(history.size()), static_cast<int>(pos), label.c_str(), 0.0f, max, ImVec2(500, 200));
}