From b89cf8d9c29ca98ec5afb6a89a217cdef0d4d83c Mon Sep 17 00:00:00 2001 From: Andrey Bychkov Date: Mon, 11 Feb 2019 14:30:53 +0300 Subject: [PATCH] Fix no return statement in the non-void function (according g++8) --- cooldown/src/Cooldown.cpp | 2 ++ cooldown/src/ResourceManager.cpp | 1 + cooldown/src/Score.cpp | 4 ++-- cooldown/src/Score.h | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cooldown/src/Cooldown.cpp b/cooldown/src/Cooldown.cpp index af1ecc0..8b8d315 100644 --- a/cooldown/src/Cooldown.cpp +++ b/cooldown/src/Cooldown.cpp @@ -82,6 +82,8 @@ bool Cooldown::init(int width, int height, int bpp) settings = new Settings(); LevelSet::create(chooser); LevelSet::loadState(chooser); + + return true; } Cooldown::~Cooldown() diff --git a/cooldown/src/ResourceManager.cpp b/cooldown/src/ResourceManager.cpp index a343a73..b4dbd34 100644 --- a/cooldown/src/ResourceManager.cpp +++ b/cooldown/src/ResourceManager.cpp @@ -247,6 +247,7 @@ SDLKey ResourceManager::waitKey() } } } + return SDLK_RETURN; } bool ResourceManager::isTurboOn() const diff --git a/cooldown/src/Score.cpp b/cooldown/src/Score.cpp index ab4ae9a..824746f 100644 --- a/cooldown/src/Score.cpp +++ b/cooldown/src/Score.cpp @@ -116,14 +116,14 @@ void Score::redraw() Label::redraw(); } -bool Score::setBonusImage(SDL_Surface* source) +void Score::setBonusImage(SDL_Surface* source) { if (bonusimage) SDL_FreeSurface(bonusimage); bonusimage = SDL_ConvertSurface(source, screen->format, SDL_SWSURFACE | SDL_SRCALPHA); } -bool Score::setPenaltyImage(SDL_Surface* source) +void Score::setPenaltyImage(SDL_Surface* source) { if (penaltyimage) SDL_FreeSurface(penaltyimage); diff --git a/cooldown/src/Score.h b/cooldown/src/Score.h index 6781782..f7f30e2 100644 --- a/cooldown/src/Score.h +++ b/cooldown/src/Score.h @@ -41,13 +41,13 @@ class Score : public Label * \brief Set image displayed on bonus event * \return TRUE on success, FALSE if something went wrong */ - bool setBonusImage(SDL_Surface* source); + void setBonusImage(SDL_Surface* source); /** * \brief Set image displayed on penalty event * \return TRUE on success, FALSE if something went wrong */ - bool setPenaltyImage(SDL_Surface* source); + void setPenaltyImage(SDL_Surface* source); /// \brief Set score value long getValue() const; -- 2.19.2