cppcheck
This commit is contained in:
@@ -145,8 +145,8 @@ Intro::Intro(SDL_Renderer *renderer, section_t *section) {
|
||||
texts[8]->setCaption(Lang::get()->getText(35));
|
||||
texts[8]->setSpeed(16);
|
||||
|
||||
for (auto text : texts) {
|
||||
text->center(GAMECANVAS_CENTER_X);
|
||||
for (auto *t : texts) {
|
||||
t->center(GAMECANVAS_CENTER_X);
|
||||
}
|
||||
|
||||
JA_PlayMusic(music, 0);
|
||||
@@ -166,25 +166,6 @@ Intro::~Intro() {
|
||||
}
|
||||
}
|
||||
|
||||
// Carga los recursos (ya no carga nada, se mantiene por si hay callers)
|
||||
bool Intro::loadMedia() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Comprueba los eventos
|
||||
void Intro::checkEvents() {
|
||||
#ifndef __EMSCRIPTEN__
|
||||
// Comprueba los eventos que hay en la cola
|
||||
while (SDL_PollEvent(eventHandler) != 0) {
|
||||
// Evento de salida de la aplicación
|
||||
if (eventHandler->type == SDL_EVENT_QUIT) {
|
||||
section->name = SECTION_PROG_QUIT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Comprueba las entradas
|
||||
void Intro::checkInput() {
|
||||
#ifndef __EMSCRIPTEN__
|
||||
@@ -352,8 +333,8 @@ void Intro::update() {
|
||||
bitmap->update();
|
||||
}
|
||||
|
||||
for (auto text : texts) {
|
||||
text->update();
|
||||
for (auto *t : texts) {
|
||||
t->update();
|
||||
}
|
||||
|
||||
// Actualiza las escenas de la intro
|
||||
@@ -374,8 +355,8 @@ void Intro::render() {
|
||||
bitmap->render();
|
||||
}
|
||||
|
||||
for (auto text : texts) {
|
||||
text->render();
|
||||
for (auto *t : texts) {
|
||||
t->render();
|
||||
}
|
||||
|
||||
// Vuelca el contenido del renderizador en pantalla
|
||||
@@ -398,6 +379,6 @@ void Intro::iterate() {
|
||||
}
|
||||
|
||||
// Procesa un evento individual
|
||||
void Intro::handleEvent(SDL_Event *event) {
|
||||
void Intro::handleEvent(const SDL_Event *event) {
|
||||
// SDL_EVENT_QUIT ya lo maneja Director
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user