From b2122ac23923169f0a4d25b8d685c1e637b0da25 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sun, 13 Oct 2024 11:04:50 +0200 Subject: [PATCH] Eliminats fitxers que s'havien colat --- cppcheck-result | 176 ------- cppcheck-result-warning-style-performance | 557 ---------------------- 2 files changed, 733 deletions(-) delete mode 100644 cppcheck-result delete mode 100644 cppcheck-result-warning-style-performance diff --git a/cppcheck-result b/cppcheck-result deleted file mode 100644 index b9b6eeb..0000000 --- a/cppcheck-result +++ /dev/null @@ -1,176 +0,0 @@ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:264:0: style: The function 'getNumFrames' is never used. [unusedFunction] -int AnimatedSprite::getNumFrames() -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:270:0: style: The function 'setCurrentFrame' is never used. [unusedFunction] -void AnimatedSprite::setCurrentFrame(int num) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:287:0: style: The function 'setAnimationCounter' is never used. [unusedFunction] -void AnimatedSprite::setAnimationCounter(std::string name, int num) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:293:0: style: The function 'setAnimationSpeed' is never used. [unusedFunction] -void AnimatedSprite::setAnimationSpeed(std::string name, int speed) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:305:0: style: The function 'setAnimationLoop' is never used. [unusedFunction] -void AnimatedSprite::setAnimationLoop(std::string name, int loop) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:317:0: style: The function 'setAnimationCompleted' is never used. [unusedFunction] -void AnimatedSprite::setAnimationCompleted(std::string name, bool value) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:335:0: style: The function 'getAnimationClip' is never used. [unusedFunction] -SDL_Rect AnimatedSprite::getAnimationClip(std::string name, Uint8 index) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:529:0: style: The function 'setAnimationFrames' is never used. [unusedFunction] -void AnimatedSprite::setAnimationFrames(Uint8 index_animation, Uint8 index_frame, int x, int y, int w, int h) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/background.cpp:239:0: style: The function 'setSrcRect' is never used. [unusedFunction] -void Background::setSrcRect(SDL_Rect value) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/background.cpp:245:0: style: The function 'setDstRect' is never used. [unusedFunction] -void Background::setDstRect(SDL_Rect value) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/balloon.cpp:681:0: style: The function 'setBlink' is never used. [unusedFunction] -void Balloon::setBlink(bool value) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/balloon.cpp:687:0: style: The function 'isBlinking' is never used. [unusedFunction] -bool Balloon::isBlinking() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/balloon.cpp:699:0: style: The function 'isVisible' is never used. [unusedFunction] -bool Balloon::isVisible() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/balloon.cpp:735:0: style: The function 'getStoppedTimer' is never used. [unusedFunction] -Uint16 Balloon::getStoppedTimer() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/game.cpp:1000:0: style: The function 'decBalloonSpeed' is never used. [unusedFunction] -void Game::decBalloonSpeed() -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/game.cpp:1169:0: style: The function 'popAllBalloons' is never used. [unusedFunction] -void Game::popAllBalloons() -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/game.cpp:1226:0: style: The function 'countBalloons' is never used. [unusedFunction] -int Game::countBalloons() -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/input.cpp:319:0: style: The function 'checkAnyInput' is never used. [unusedFunction] -bool Input::checkAnyInput(int device, int controller_index) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/input.cpp:498:0: style: The function 'printBindings' is never used. [unusedFunction] -void Input::printBindings(int device, int controller_index) const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/input.cpp:531:0: style: The function 'getIndexByName' is never used. [unusedFunction] -int Input::getIndexByName(std::string name) const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/input.cpp:575:0: style: The function 'to_inputs_e' is never used. [unusedFunction] -InputType Input::to_inputs_e(std::string name) const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:114:0: style: The function 'getZoomW' is never used. [unusedFunction] -float MovingSprite::getZoomW() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:120:0: style: The function 'getZoomH' is never used. [unusedFunction] -float MovingSprite::getZoomH() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:126:0: style: The function 'getAngle' is never used. [unusedFunction] -double MovingSprite::getAngle() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:196:0: style: The function 'setAngle' is never used. [unusedFunction] -void MovingSprite::setAngle(double value) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:208:0: style: The function 'decAngle' is never used. [unusedFunction] -void MovingSprite::decAngle(double value) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:214:0: style: The function 'getRotate' is never used. [unusedFunction] -bool MovingSprite::getRotate() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:220:0: style: The function 'getRotateSpeed' is never used. [unusedFunction] -Uint16 MovingSprite::getRotateSpeed() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:256:0: style: The function 'disableRotate' is never used. [unusedFunction] -void MovingSprite::disableRotate() -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:286:0: style: The function 'flip' is never used. [unusedFunction] -void MovingSprite::flip() -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:292:0: style: The function 'getFlip' is never used. [unusedFunction] -SDL_RendererFlip MovingSprite::getFlip() -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:414:0: style: The function 'hasDied' is never used. [unusedFunction] -bool Player::hasDied() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:523:0: style: The function 'getStatusPlaying' is never used. [unusedFunction] -PlayerStatus Player::getStatusPlaying() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:535:0: style: The function 'setScoreMultiplier' is never used. [unusedFunction] -void Player::setScoreMultiplier(float value) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:568:0: style: The function 'getInvulnerableCounter' is never used. [unusedFunction] -int Player::getInvulnerableCounter() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:574:0: style: The function 'setInvulnerableCounter' is never used. [unusedFunction] -void Player::setInvulnerableCounter(int value) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:611:0: style: The function 'getPowerUpCounter' is never used. [unusedFunction] -int Player::getPowerUpCounter() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:617:0: style: The function 'setPowerUpCounter' is never used. [unusedFunction] -void Player::setPowerUpCounter(int value) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:666:0: style: The function 'enableInput' is never used. [unusedFunction] -void Player::enableInput() -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:672:0: style: The function 'disableInput' is never used. [unusedFunction] -void Player::disableInput() -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:697:0: style: The function 'setPlayerTextures' is never used. [unusedFunction] -void Player::setPlayerTextures(std::vector> texture) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/screen.cpp:248:0: style: The function 'setWindowSize' is never used. [unusedFunction] -void Screen::setWindowSize(int size) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/screen.cpp:271:0: style: The function 'setBorderColor' is never used. [unusedFunction] -void Screen::setBorderColor(Color color) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/smart_sprite.cpp:55:0: style: The function 'getDestX' is never used. [unusedFunction] -int SmartSprite::getDestX() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/smart_sprite.cpp:61:0: style: The function 'getDestY' is never used. [unusedFunction] -int SmartSprite::getDestY() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/smart_sprite.cpp:148:0: style: The function 'isOnDestination' is never used. [unusedFunction] -bool SmartSprite::isOnDestination() const -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/sprite.cpp:159:0: style: The function 'incPosY' is never used. [unusedFunction] -void Sprite::incPosY(int value) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/text.cpp:264:0: style: The function 'setFixedWidth' is never used. [unusedFunction] -void Text::setFixedWidth(bool value) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:236:0: style: The function 'getSDLTexture' is never used. [unusedFunction] -SDL_Texture *Texture::getSDLTexture() -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:242:0: style: The function 'newSurface' is never used. [unusedFunction] -Surface Texture::newSurface(int w, int h) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:184:0: style: The function 'toLower' is never used. [unusedFunction] -std::string toLower(std::string str) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:200:0: style: The function 'getSound' is never used. [unusedFunction] -JA_Sound_t *getSound(std::vector sounds, std::string name) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:228:0: style: The function 'sortHiScoreTable' is never used. [unusedFunction] -HiScoreEntry sortHiScoreTable(HiScoreEntry entry1, HiScoreEntry entry2) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:239:0: style: The function 'DrawCircle' is never used. [unusedFunction] -void DrawCircle(SDL_Renderer *renderer, int32_t centerX, int32_t centerY, int32_t radius) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:278:0: style: The function 'lightenColor' is never used. [unusedFunction] -Color lightenColor(Color color, int amount) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:288:0: style: The function 'DarkenColor' is never used. [unusedFunction] -Color DarkenColor(Color color, int amount) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:316:0: style: The function 'easeOutQuint' is never used. [unusedFunction] -double easeOutQuint(double t) -^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/writer.cpp:101:0: style: The function 'IsEnabled' is never used. [unusedFunction] -bool Writer::IsEnabled() const -^ -nofile:0:0: information: Too many #ifdef configurations - cppcheck only checks 12 configurations. Use --force to check all configurations. For more details, use --enable=information. [toomanyconfigs] - diff --git a/cppcheck-result-warning-style-performance b/cppcheck-result-warning-style-performance deleted file mode 100644 index 19ad152..0000000 --- a/cppcheck-result-warning-style-performance +++ /dev/null @@ -1,557 +0,0 @@ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:60:11: warning: The class 'MovingSprite' defines member function with name 'getPosX' also defined in its parent class 'Sprite'. [duplInheritedMember] - float getPosX() const; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/sprite.h:29:9: note: Parent function 'Sprite::getPosX' - int getPosX() const; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:60:11: note: Derived function 'MovingSprite::getPosX' - float getPosX() const; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:61:11: warning: The class 'MovingSprite' defines member function with name 'getPosY' also defined in its parent class 'Sprite'. [duplInheritedMember] - float getPosY() const; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/sprite.h:30:9: note: Parent function 'Sprite::getPosY' - int getPosY() const; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:61:11: note: Derived function 'MovingSprite::getPosY' - float getPosY() const; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/asset.cpp:31:5: performance: Variable 'executable_path_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - executable_path_ = executable_path.substr(0, executable_path.find_last_of("\\/")); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/balloon.cpp:13:2: performance: Variable 'sprite_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - sprite_ = std::make_unique(texture, "", animation); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/bullet.cpp:23:5: performance: Variable 'sprite_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - sprite_ = std::make_unique(SDL_Rect{x, y, BULLET_WIDTH, BULLET_HEIGHT}, texture); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/define_buttons.h:49:5: style: Class 'DefineButtons' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] - DefineButtons(std::unique_ptr text); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/fade.h:57:2: style: Class 'Fade' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] - Fade(SDL_Renderer *renderer); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/hiscore_table.h:73:2: style: Class 'HiScoreTable' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] - HiScoreTable(JA_Music_t *music); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/instructions.h:83:2: style: Class 'Instructions' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] - Instructions(JA_Music_t *music); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/writer.h:30:2: style: Class 'Writer' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] - Writer(std::shared_ptr text); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/intro.h:55:2: style: Class 'Intro' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] - Intro(JA_Music_t *music); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/manage_hiscore_table.h:27:5: style: Class 'ManageHiScoreTable' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] - ManageHiScoreTable(std::vector *table); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/title.h:98:2: style: Class 'Title' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] - Title(JA_Music_t *music); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/director.cpp:301:19: style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] - flags = flags | SDL_RENDERER_PRESENTVSYNC; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/director.cpp:481:39: performance: Function parameter 'filepath' should be passed by const reference. [passedByValue] -void Director::loadParams(std::string filepath) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/director.cpp:506:47: performance: Function parameter 'folder' should be passed by const reference. [passedByValue] -void Director::createSystemFolder(std::string folder) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/director.cpp:572:12: performance: Range variable 'l' should be declared as const reference. [iterateByValue] - for (auto l : list) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/director.cpp:590:12: performance: Range variable 'l' should be declared as const reference. [iterateByValue] - for (auto l : list) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/director.cpp:487:54: style: Parameter 'argv' can be declared as const array [constParameter] -void Director::checkProgramArguments(int argc, char *argv[]) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/enemy_formations.cpp:455:7: style: Variable 'incX' is assigned a value that is never used. [unreadVariable] - incX = BALLOON_WIDTH_1 + 1; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/game.h:275:7: style: Unused private function: 'Game::decBalloonSpeed' [unusedPrivateFunction] - void decBalloonSpeed(); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/game.h:287:7: style: Unused private function: 'Game::popAllBalloons' [unusedPrivateFunction] - void popAllBalloons(); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/game.h:299:6: style: Unused private function: 'Game::countBalloons' [unusedPrivateFunction] - int countBalloons(); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/game.cpp:2421:13: style: Condition 'igetMenace(); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/game.cpp:2354:10: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm] - power += balloon->getPower(); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/game.cpp:2735:3: style: Consider using std::find_if algorithm instead of a raw loop. [useStlAlgorithm] - { - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/game.cpp:604:30: style: Variable 'file_name' is assigned a value that is never used. [unreadVariable] - const std::string file_name = file_path.substr(file_path.find_last_of("\\/") + 1); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/game.cpp:673:37: performance: Function parameter 'file_path' should be passed by const reference. [passedByValue] -bool Game::saveDemoFile(std::string file_path) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/game.cpp:676:30: style: Variable 'file_name' is assigned a value that is never used. [unreadVariable] - const std::string file_name = file_path.substr(file_path.find_last_of("\\/") + 1); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/game_logo.cpp:19:5: performance: Variable 'dust_texture_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - dust_texture_ = std::make_shared(Screen::get()->getRenderer(), Asset::get()->get("title_dust.png")); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/input.h:94:2: style: Class 'Input' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] - Input(std::string game_controller_db_path); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/input.cpp:12:30: performance: Function parameter 'game_controller_db_path' should be passed by const reference. [passedByValue] -void Input::init(std::string game_controller_db_path) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/input.cpp:30:26: performance: Function parameter 'game_controller_db_path' should be passed by const reference. [passedByValue] -Input::Input(std::string game_controller_db_path) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/input.cpp:531:39: performance: Function parameter 'name' should be passed by const reference. [passedByValue] -int Input::getIndexByName(std::string name) const - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/input.cpp:575:42: performance: Function parameter 'name' should be passed by const reference. [passedByValue] -InputType Input::to_inputs_e(std::string name) const - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/input.cpp:441:32: style: Variable 'separator' is assigned a value that is never used. [unreadVariable] - const std::string separator(" #"); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/intro.cpp:416:13: style: Variable 'text' can be declared as reference to const [constVariableReference] - for (auto &text : texts_) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/item.cpp:11:2: performance: Variable 'sprite_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - sprite_ = std::make_unique(texture, "", animation); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/item.cpp:14:2: performance: Variable 'time_to_live_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - time_to_live_ = 600; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/manage_hiscore_table.cpp:89:26: style: C-style pointer casting [cstyleCast] - char *name = (char *)malloc(nameSize + 1); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/manage_hiscore_table.cpp:53:38: performance: Function parameter 'a' should be passed by const reference. [passedByValue] - bool operator()(HiScoreEntry a, HiScoreEntry b) const { return a.score > b.score; } - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/manage_hiscore_table.cpp:53:54: performance: Function parameter 'b' should be passed by const reference. [passedByValue] - bool operator()(HiScoreEntry a, HiScoreEntry b) const { return a.score > b.score; } - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/manage_hiscore_table.cpp:60:51: performance: Function parameter 'file_path' should be passed by const reference. [passedByValue] -bool ManageHiScoreTable::loadFromFile(std::string file_path) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/manage_hiscore_table.cpp:116:49: performance: Function parameter 'file_path' should be passed by const reference. [passedByValue] -bool ManageHiScoreTable::saveToFile(std::string file_path) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/manage_hiscore_table.cpp:65:32: style: Variable 'filename' is assigned a value that is never used. [unreadVariable] - const std::string filename = file_path.substr(file_path.find_last_of("\\/") + 1); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/manage_hiscore_table.cpp:119:32: style: Variable 'fileName' is assigned a value that is never used. [unreadVariable] - const std::string fileName = file_path.substr(file_path.find_last_of("\\/") + 1); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:32:2: performance: Variable 'flip_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - flip_ = SDL_FLIP_NONE; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:87:21: warning: The class 'MovingSprite' defines member function with name 'getPosX' also defined in its parent class 'Sprite'. [duplInheritedMember] -float MovingSprite::getPosX() const - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/sprite.h:29:9: note: Parent function 'Sprite::getPosX' - int getPosX() const; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:87:21: note: Derived function 'MovingSprite::getPosX' -float MovingSprite::getPosX() const - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:93:21: warning: The class 'MovingSprite' defines member function with name 'getPosY' also defined in its parent class 'Sprite'. [duplInheritedMember] -float MovingSprite::getPosY() const - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/sprite.h:30:9: note: Parent function 'Sprite::getPosY' - int getPosY() const; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:93:21: note: Derived function 'MovingSprite::getPosY' -float MovingSprite::getPosY() const - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/notify.cpp:17:5: performance: Variable 'bgColor' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - bgColor = param.notification.color; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/notify.cpp:13:120: performance: Function parameter 'soundFile' should be passed by const reference. [passedByValue] -Notify::Notify(SDL_Renderer *renderer, std::string iconFile, std::string bitmapFile, std::string textFile, std::string soundFile) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/options.cpp:243:29: performance: Function parameter 'var' should be passed by const reference. [passedByValue] -bool setOptions(std::string var, std::string value) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/options.cpp:243:46: performance: Function parameter 'value' should be passed by const reference. [passedByValue] -bool setOptions(std::string var, std::string value) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/options.cpp:89:30: style: Variable 'file_name' is assigned a value that is never used. [unreadVariable] - const std::string file_name = file_path.substr(file_path.find_last_of("\\/") + 1); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/options.cpp:153:30: style: Variable 'file_name' is assigned a value that is never used. [unreadVariable] - const std::string file_name = file_path.substr(file_path.find_last_of("\\/") + 1); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/param.cpp:155:28: performance: Function parameter 'var' should be passed by const reference. [passedByValue] -bool setParams(std::string var, std::string value) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/param.cpp:155:45: performance: Function parameter 'value' should be passed by const reference. [passedByValue] -bool setParams(std::string var, std::string value) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/param.cpp:101:48: warning: Either the condition 'pos<=(int)line.size()' is redundant or 'pos' can have the value line.size(). Expression 'line[pos]' cause access out of bounds. [containerOutOfBounds] - while (pos <= (int)line.size() && (int)line[pos] > 32) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/param.cpp:101:16: note: Assuming that condition 'pos<=(int)line.size()' is not redundant - while (pos <= (int)line.size() && (int)line[pos] > 32) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/param.cpp:101:48: note: Access out of bounds - while (pos <= (int)line.size() && (int)line[pos] > 32) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/param.cpp:117:49: warning: Either the condition 'pos<=(int)line.size()' is redundant or 'pos' can have the value line.size(). Expression 'line[pos]' cause access out of bounds. [containerOutOfBounds] - while (pos <= (int)line.size() && (int)line[pos] <= 32) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/param.cpp:117:17: note: Assuming that condition 'pos<=(int)line.size()' is not redundant - while (pos <= (int)line.size() && (int)line[pos] <= 32) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/param.cpp:117:49: note: Access out of bounds - while (pos <= (int)line.size() && (int)line[pos] <= 32) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/param.cpp:130:50: warning: Either the condition 'pos<=(int)line.size()' is redundant or 'pos' can have the value line.size(). Expression 'line[pos]' cause access out of bounds. [containerOutOfBounds] - while (pos <= (int)line.size() && (int)line[pos] > 32) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/param.cpp:130:18: note: Assuming that condition 'pos<=(int)line.size()' is not redundant - while (pos <= (int)line.size() && (int)line[pos] > 32) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/param.cpp:130:50: note: Access out of bounds - while (pos <= (int)line.size() && (int)line[pos] > 32) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/param.cpp:84:11: performance: Ineffective call of function 'substr' because a prefix of the string is assigned to itself. Use resize() or pop_back() instead. [uselessCallsSubstr] - line = line.substr(0, line.find("#")); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:14:9: warning: Member variable 'Player::controller_index_' is not initialized in the constructor. [uninitMemberVar] -Player::Player(int id, float x, int y, bool demo, SDL_Rect *play_area, std::vector> texture, std::vector *> animations) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:17:2: performance: Variable 'player_sprite_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - player_sprite_ = std::make_unique(texture[0], "", animations[0]); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:18:2: performance: Variable 'power_sprite_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - power_sprite_ = std::make_unique(texture[1], "", animations[1]); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:241:22: style: The statement 'if (status_walking_!=status) status_walking_=status' is logically equivalent to 'status_walking_=status'. [duplicateConditionalAssign] - if (status_walking_ != status) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:243:19: note: Assignment 'status_walking_=status' - status_walking_ = status; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:241:22: note: Condition 'status_walking_!=status' is redundant - if (status_walking_ != status) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:251:21: style: The statement 'if (status_firing_!=status) status_firing_=status' is logically equivalent to 'status_firing_=status'. [duplicateConditionalAssign] - if (status_firing_ != status) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:253:18: note: Assignment 'status_firing_=status' - status_firing_ = status; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:251:21: note: Condition 'status_firing_!=status' is redundant - if (status_firing_ != status) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:697:70: performance: Function parameter 'texture' should be passed by const reference. [passedByValue] -void Player::setPlayerTextures(std::vector> texture) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:747:34: performance: Function parameter 'name' should be passed by const reference. [passedByValue] -void Player::setName(std::string name) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/player.cpp:753:40: performance: Function parameter 'record_name' should be passed by const reference. [passedByValue] -void Player::setRecordName(std::string record_name) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/scoreboard.cpp:40:2: performance: Variable 'game_power_meter_texture_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - game_power_meter_texture_ = nullptr; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/scoreboard.cpp:41:2: performance: Variable 'power_meter_sprite_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - power_meter_sprite_ = nullptr; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/scoreboard.cpp:42:2: performance: Variable 'text_scoreboard_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - text_scoreboard_ = nullptr; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/scoreboard.h:106:2: style: Class 'Scoreboard' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] - Scoreboard(SDL_Renderer *renderer); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/scoreboard.cpp:326:13: style: Local variable 'rect_' shadows outer variable [shadowVariable] - SDL_Rect rect_ = {enter_name_pos_.x, enter_name_pos_.y, 5, 7}; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/scoreboard.h:71:11: note: Shadowed declaration - SDL_Rect rect_; // Posición y dimensiones del marcador - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/scoreboard.cpp:326:13: note: Shadow variable - SDL_Rect rect_ = {enter_name_pos_.x, enter_name_pos_.y, 5, 7}; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/scoreboard.cpp:133:50: performance: Function parameter 'name_' should be passed by const reference. [passedByValue] -void Scoreboard::setName(int panel_, std::string name_) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/scoreboard.cpp:139:56: performance: Function parameter 'record_name_' should be passed by const reference. [passedByValue] -void Scoreboard::setRecordName(int panel_, std::string record_name_) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/scoreboard.cpp:187:45: performance: Function parameter 'name_' should be passed by const reference. [passedByValue] -void Scoreboard::setHiScoreName(std::string name_) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/screen.cpp:50:5: performance: Variable 'src_rect_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - src_rect_ = {0, 0, param.game.width, param.game.height}; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/screen.cpp:51:5: performance: Variable 'dst_rect_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - dst_rect_ = {0, 0, param.game.width, param.game.height}; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/screen.cpp:52:5: performance: Variable 'border_color_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - border_color_ = {0, 0, 0}; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/screen.cpp:66:5: performance: Variable 'fps_ticks_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - fps_ticks_ = 0; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/screen.cpp:458:43: performance: Function parameter 'text1' should be passed by const reference. [passedByValue] -void Screen::showNotification(std::string text1, std::string text2, int icon) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/screen.cpp:458:62: performance: Function parameter 'text2' should be passed by const reference. [passedByValue] -void Screen::showNotification(std::string text1, std::string text2, int icon) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/screen.cpp:188:24: style: Variable 'options.video.mode' is reassigned a value before the old one has been used. [redundantAssignment] - options.video.mode = ScreenVideoMode::WINDOW; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/screen.cpp:186:24: note: options.video.mode is assigned - options.video.mode = videoMode; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/screen.cpp:188:24: note: options.video.mode is overwritten - options.video.mode = ScreenVideoMode::WINDOW; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/text.cpp:82:49: performance: Function parameter 'text_file' should be passed by const reference. [passedByValue] -Text::Text(std::string bitmap_file, std::string text_file, SDL_Renderer *renderer) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/text.cpp:106:24: performance: Function parameter 'text_file' should be passed by const reference. [passedByValue] -Text::Text(std::string text_file, std::shared_ptr texture) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/text.cpp:149:44: performance: Function parameter 'text' should be passed by const reference. [passedByValue] -void Text::write(int x, int y, std::string text, int kerning, int lenght) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/text.cpp:172:51: performance: Function parameter 'text' should be passed by const reference. [passedByValue] -void Text::writeColored(int x, int y, std::string text, Color color, int kerning, int lenght) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/text.cpp:180:52: performance: Function parameter 'text' should be passed by const reference. [passedByValue] -void Text::writeShadowed(int x, int y, std::string text, Color color, Uint8 shadow_distance, int kerning, int lenght) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/text.cpp:189:52: performance: Function parameter 'text' should be passed by const reference. [passedByValue] -void Text::writeCentered(int x, int y, std::string text, int kerning, int lenght) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/text.cpp:196:59: performance: Function parameter 'text' should be passed by const reference. [passedByValue] -void Text::writeDX(Uint8 flags, int x, int y, std::string text, int kerning, Color textColor, Uint8 shadow_distance, Color shadow_color, int lenght) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/text.cpp:238:30: performance: Function parameter 'text' should be passed by const reference. [passedByValue] -int Text::lenght(std::string text, int kerning) const - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/text.cpp:270:35: performance: Function parameter 'path' should be passed by const reference. [passedByValue] -void Text::addPalette(std::string path) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/text.cpp:24:30: style: Variable 'file_name' is assigned a value that is never used. [unreadVariable] - const std::string file_name = file_path.substr(file_path.find_last_of("\\/") + 1).c_str(); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.h:36:13: style: Unused private function: 'Texture::newSurface' [unusedPrivateFunction] - Surface newSurface(int w, int h); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:79:17: style: Condition 'req_format==STBI_rgb' is always false [knownConditionTrueFalse] - if (req_format == STBI_rgb) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:60:19: note: Assignment 'req_format=STBI_rgb_alpha', assigned value is 4 - int req_format = STBI_rgb_alpha; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:79:17: note: Condition 'req_format==STBI_rgb' is always false - if (req_format == STBI_rgb) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:99:66: style: C-style pointer casting [cstyleCast] - SDL_Surface *loadedSurface = SDL_CreateRGBSurfaceWithFormatFrom((void *)data, width, height, depth, pitch, pixel_format); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:244:18: style: C-style pointer casting [cstyleCast] - Surface surf = (Surface)malloc(sizeof(surface_s)); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:247:15: style: C-style pointer casting [cstyleCast] - surf->data = (Uint8 *)malloc(w * h); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:279:18: style: C-style pointer casting [cstyleCast] - Uint8 *buffer = (Uint8 *)malloc(size); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:290:21: style: C-style pointer casting [cstyleCast] - Surface surface = (Surface)malloc(sizeof(surface_s)); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:315:37: style: C-style pointer casting [cstyleCast] - SDL_LockTexture(texture_, nullptr, (void **)&pixels, &pitch); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:343:18: style: C-style pointer casting [cstyleCast] - Uint8 *buffer = (Uint8 *)malloc(size); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:14:54: performance: Function parameter 'path' should be passed by const reference. [passedByValue] -Texture::Texture(SDL_Renderer *renderer, std::string path) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:57:40: performance: Function parameter 'path' should be passed by const reference. [passedByValue] -bool Texture::loadFromFile(std::string path) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:364:38: performance: Function parameter 'path' should be passed by const reference. [passedByValue] -void Texture::addPalette(std::string path) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:41:4: performance: Passing the result of c_str() to a function that takes std::string as argument no. 1 is slow and redundant. [stlcstrParam] - addPalette(path_.c_str()); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.cpp:59:30: style: Variable 'file_name' is assigned a value that is never used. [unreadVariable] - const std::string file_name = path.substr(path.find_last_of("\\/") + 1); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/title.cpp:318:12: style: Local variable 'num_controllers_' shadows outer variable [shadowVariable] - const int num_controllers_ = input_->getNumControllers(); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/title.h:70:6: note: Shadowed declaration - int num_controllers_; // Número de mandos conectados - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/title.cpp:318:12: note: Shadow variable - const int num_controllers_ = input_->getNumControllers(); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:187:19: style: C-style pointer casting [cstyleCast] - char *lower = (char *)malloc(str.size() + 1); - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:166:31: performance: Function parameter 'str' should be passed by const reference. [passedByValue] -bool stringToBool(std::string str) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:184:33: performance: Function parameter 'str' should be passed by const reference. [passedByValue] -std::string toLower(std::string str) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:200:45: performance: Function parameter 'sounds' should be passed by const reference. [passedByValue] -JA_Sound_t *getSound(std::vector sounds, std::string name) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:200:65: performance: Function parameter 'name' should be passed by const reference. [passedByValue] -JA_Sound_t *getSound(std::vector sounds, std::string name) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:202:15: performance: Range variable 's' should be declared as const reference. [iterateByValue] - for (auto s : sounds) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:214:45: performance: Function parameter 'music' should be passed by const reference. [passedByValue] -JA_Music_t *getMusic(std::vector music, std::string name) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:214:64: performance: Function parameter 'name' should be passed by const reference. [passedByValue] -JA_Music_t *getMusic(std::vector music, std::string name) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:216:15: performance: Range variable 'm' should be declared as const reference. [iterateByValue] - for (auto m : music) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:228:44: performance: Function parameter 'entry1' should be passed by const reference. [passedByValue] -HiScoreEntry sortHiScoreTable(HiScoreEntry entry1, HiScoreEntry entry2) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:228:65: performance: Function parameter 'entry2' should be passed by const reference. [passedByValue] -HiScoreEntry sortHiScoreTable(HiScoreEntry entry1, HiScoreEntry entry2) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:32:29: style: Parameter 'a' can be declared as reference to const [constParameterReference] -bool checkCollision(Circle &a, Circle &b) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:32:40: style: Parameter 'b' can be declared as reference to const [constParameterReference] -bool checkCollision(Circle &a, Circle &b) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:50:29: style: Parameter 'a' can be declared as reference to const [constParameterReference] -bool checkCollision(Circle &a, SDL_Rect &b) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:50:42: style: Parameter 'b' can be declared as reference to const [constParameterReference] -bool checkCollision(Circle &a, SDL_Rect &b) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:95:31: style: Parameter 'a' can be declared as reference to const [constParameterReference] -bool checkCollision(SDL_Rect &a, SDL_Rect &b) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:95:44: style: Parameter 'b' can be declared as reference to const [constParameterReference] -bool checkCollision(SDL_Rect &a, SDL_Rect &b) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:135:32: style: Parameter 'p' can be declared as reference to const [constParameterReference] -bool checkCollision(SDL_Point &p, SDL_Rect &r) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:135:45: style: Parameter 'r' can be declared as reference to const [constParameterReference] -bool checkCollision(SDL_Point &p, SDL_Rect &r) - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:205:9: style: Consider using std::find_if algorithm instead of a raw loop. [useStlAlgorithm] - { - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/utils.cpp:219:9: style: Consider using std::find_if algorithm instead of a raw loop. [useStlAlgorithm] - { - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/writer.cpp:11:2: performance: Variable 'caption_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] - caption_ = ""; - ^ -/home/sergio/gitea/coffee_crisis_arcade_edition/source/writer.cpp:81:37: performance: Function parameter 'text' should be passed by const reference. [passedByValue] -void Writer::setCaption(std::string text) - ^ -nofile:0:0: information: Too many #ifdef configurations - cppcheck only checks 12 configurations. Use --force to check all configurations. For more details, use --enable=information. [toomanyconfigs] -