fix: cppcheck (21 troballes)

This commit is contained in:
2026-05-16 13:52:31 +02:00
parent a48fe51f73
commit bf7be3a7f1
13 changed files with 96 additions and 117 deletions
+2 -2
View File
@@ -246,7 +246,7 @@ namespace Overlay {
// Calcula amplada total interpolant cada segment per la seva anim
float total_w = 0.0F;
for (auto& seg : info_segments_) {
for (const auto& seg : info_segments_) {
if (seg.anim > 0.0F && !seg.text.empty()) {
int w = seg.mono_digits
? font_->widthMonoDigits(seg.text.c_str(), DIGIT_CELL)
@@ -270,7 +270,7 @@ namespace Overlay {
// Dibuixa cada segment en la seva posició x acumulada
float cur_x = (SCREEN_W - total_w) / 2.0F;
for (auto& seg : info_segments_) {
for (const auto& seg : info_segments_) {
if (seg.anim > 0.01F && !seg.text.empty()) {
int xi = static_cast<int>(cur_x);
int seg_w = seg.mono_digits