cppcheck
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
#include <stdlib.h> // for rand
|
||||
|
||||
#include <algorithm> // for max, min
|
||||
#include <numeric> // for accumulate
|
||||
#include <fstream> // for basic_ifstream
|
||||
#include <iostream> // for basic_ostream, char_traits, operator<<
|
||||
#include <numeric> // for accumulate
|
||||
|
||||
#include "core/audio/jail_audio.hpp" // for JA_PlaySound, JA_DeleteSound, JA_LoadSound
|
||||
#include "core/input/global_inputs.hpp" // for GlobalInputs::handle
|
||||
@@ -2184,8 +2184,7 @@ void Game::updateDeathSequence() {
|
||||
|
||||
// Calcula y establece el valor de amenaza en funcion de los globos activos
|
||||
void Game::evaluateAndSetMenace() {
|
||||
menaceCurrent = std::accumulate(balloons.begin(), balloons.end(), Uint8(0),
|
||||
[](Uint8 acc, Balloon *b) { return b->isEnabled() ? acc + b->getMenace() : acc; });
|
||||
menaceCurrent = std::accumulate(balloons.begin(), balloons.end(), Uint8(0), [](Uint8 acc, Balloon *b) { return b->isEnabled() ? acc + b->getMenace() : acc; });
|
||||
}
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
@@ -3048,8 +3047,7 @@ bool Game::canPowerBallBeCreated() {
|
||||
|
||||
// Calcula el poder actual de los globos en pantalla
|
||||
int Game::calculateScreenPower() {
|
||||
return std::accumulate(balloons.begin(), balloons.end(), 0,
|
||||
[](int acc, Balloon *b) { return b->isEnabled() ? acc + b->getPower() : acc; });
|
||||
return std::accumulate(balloons.begin(), balloons.end(), 0, [](int acc, Balloon *b) { return b->isEnabled() ? acc + b->getPower() : acc; });
|
||||
}
|
||||
|
||||
// Inicializa las variables que contienen puntos de ruta para mover objetos
|
||||
|
||||
Reference in New Issue
Block a user