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
+3 -4
View File
@@ -1,5 +1,6 @@
#include "game/mapa.hpp"
#include <algorithm>
#include <cstdlib>
#include "core/jail/jgame.hpp"
@@ -246,10 +247,8 @@ void Mapa::comprovaCaixa(Uint8 num) {
}
// Si algun costat encara no està passat, no hi ha res que fer
for (bool i : this->tombes[num].costat) {
if (!i) {
return;
}
if (std::any_of(std::begin(this->tombes[num].costat), std::end(this->tombes[num].costat), [](bool c) { return !c; })) {
return;
}
// Sinó, pos la acabem d'obrir