Afegides recomanacions de cppcheck
Optimitzada la funció updateBalloonSpeed() i eliminades funcions sobrants o redundants
This commit is contained in:
@@ -1,210 +1,36 @@
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:14:11: warning: The class 'MovingSprite' defines member variable with name 'x_' also defined in its parent class 'Sprite'. [duplInheritedMember]
|
||||
float x_; // Posición en el eje X
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/sprite.h:11:9: note: Parent variable 'Sprite::x_'
|
||||
int x_; // Posición en el eje X donde dibujar el sprite
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:14:11: note: Derived variable 'MovingSprite::x_'
|
||||
float x_; // Posición en el eje X
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:15:11: warning: The class 'MovingSprite' defines member variable with name 'y_' also defined in its parent class 'Sprite'. [duplInheritedMember]
|
||||
float y_; // Posición en el eje Y
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/sprite.h:12:9: note: Parent variable 'Sprite::y_'
|
||||
int y_; // Posición en el eje Y donde dibujar el sprite
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:15:11: note: Derived variable 'MovingSprite::y_'
|
||||
float y_; // Posición en el eje Y
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:51:10: warning: The class 'MovingSprite' defines member function with name 'render' also defined in its parent class 'Sprite'. [duplInheritedMember]
|
||||
void render();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/sprite.h:30:10: note: Parent function 'Sprite::render'
|
||||
void render();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:51:10: note: Derived function 'MovingSprite::render'
|
||||
void render();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:54:11: warning: The class 'MovingSprite' defines member function with name 'getPosX' also defined in its parent class 'Sprite'. [duplInheritedMember]
|
||||
/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:33:9: note: Parent function 'Sprite::getPosX'
|
||||
/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:54:11: note: Derived function 'MovingSprite::getPosX'
|
||||
/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:55:11: warning: The class 'MovingSprite' defines member function with name 'getPosY' also defined in its parent class 'Sprite'. [duplInheritedMember]
|
||||
/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:34:9: note: Parent function 'Sprite::getPosY'
|
||||
/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:55:11: note: Derived function 'MovingSprite::getPosY'
|
||||
/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/moving_sprite.h:122:14: warning: The class 'MovingSprite' defines member function with name 'getRect' also defined in its parent class 'Sprite'. [duplInheritedMember]
|
||||
SDL_Rect getRect();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/sprite.h:44:14: note: Parent function 'Sprite::getRect'
|
||||
SDL_Rect getRect() const;
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:122:14: note: Derived function 'MovingSprite::getRect'
|
||||
SDL_Rect getRect();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:519:22: warning: The class 'AnimatedSprite' defines member function with name 'update' also defined in its parent class 'MovingSprite'. [duplInheritedMember]
|
||||
void AnimatedSprite::update()
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:45:10: note: Parent function 'MovingSprite::update'
|
||||
void update();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:519:22: note: Derived function 'AnimatedSprite::update'
|
||||
void AnimatedSprite::update()
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/texture.h:52:5: style: Class 'Texture' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
|
||||
Texture(SDL_Renderer *renderer, std::string path = "");
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/sprite.h:23:5: style: Class 'Sprite' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
|
||||
Sprite(int x = 0, int y = 0, int w = 0, int h = 0, std::shared_ptr<Texture> texture = nullptr);
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/sprite.h:24:5: style: Class 'Sprite' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
|
||||
Sprite(SDL_Rect rect, std::shared_ptr<Texture> texture = nullptr);
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:36:5: style: Class 'MovingSprite' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
|
||||
MovingSprite(float x = 0, float y = 0, int w = 0, int h = 0, float velx = 0, float vely = 0, float accelx = 0, float accely = 0, std::shared_ptr<Texture> texture = nullptr);
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.h:40:5: style: Class 'AnimatedSprite' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
|
||||
AnimatedSprite(std::shared_ptr<Texture> texture = nullptr, std::string file = "", std::vector<std::string> *buffer = nullptr);
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.h:41:5: style: Class 'AnimatedSprite' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
|
||||
AnimatedSprite(AnimatedFile *animation);
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:159:78: performance: Function parameter 'file' should be passed by const reference. [passedByValue]
|
||||
AnimatedSprite::AnimatedSprite(std::shared_ptr<Texture> texture, std::string file, std::vector<std::string> *buffer)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:208:42: performance: Function parameter 'name' should be passed by const reference. [passedByValue]
|
||||
int AnimatedSprite::getIndex(std::string name)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:212:12: performance: Range variable 'a' should be declared as const reference. [iterateByValue]
|
||||
for (auto a : animations_)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:287:54: performance: Function parameter 'name' should be passed by const reference. [passedByValue]
|
||||
void AnimatedSprite::setAnimationCounter(std::string name, int num)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:293:52: performance: Function parameter 'name' should be passed by const reference. [passedByValue]
|
||||
void AnimatedSprite::setAnimationSpeed(std::string name, int speed)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:305:51: performance: Function parameter 'name' should be passed by const reference. [passedByValue]
|
||||
void AnimatedSprite::setAnimationLoop(std::string name, int loop)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:317:56: performance: Function parameter 'name' should be passed by const reference. [passedByValue]
|
||||
void AnimatedSprite::setAnimationCompleted(std::string name, bool value)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:335:55: performance: Function parameter 'name' should be passed by const reference. [passedByValue]
|
||||
SDL_Rect AnimatedSprite::getAnimationClip(std::string name, Uint8 index)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:493:54: performance: Function parameter 'name' should be passed by const reference. [passedByValue]
|
||||
void AnimatedSprite::setCurrentAnimation(std::string name)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:186:46: style: Parameter 'animation' can be declared as pointer to const [constParameterPointer]
|
||||
AnimatedSprite::AnimatedSprite(AnimatedFile *animation)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:172:16: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
|
||||
animations_.push_back(animation);
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:197:15: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
|
||||
animations_.push_back(a);
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.cpp:18: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/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/asset.h:48:2: style: Class 'Asset' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
|
||||
Asset(std::string path);
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/asset.cpp:11:30: performance: Function parameter 'executable_path' should be passed by const reference. [passedByValue]
|
||||
void Asset::init(std::string executable_path)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/asset.cpp:29:26: performance: Function parameter 'executable_path' should be passed by const reference. [passedByValue]
|
||||
Asset::Asset(std::string executable_path)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/asset.cpp:36:29: performance: Function parameter 'file' should be passed by const reference. [passedByValue]
|
||||
void Asset::add(std::string file, AssetType type, bool required, bool absolute)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/asset.cpp:49:36: performance: Function parameter 'text' should be passed by const reference. [passedByValue]
|
||||
std::string Asset::get(std::string text) const
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/asset.cpp:51:15: performance: Range variable 'f' should be declared as const reference. [iterateByValue]
|
||||
for (auto f : file_list_)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/asset.cpp:86:19: performance: Range variable 'f' should be declared as const reference. [iterateByValue]
|
||||
for (auto f : file_list_)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/asset.cpp:101:23: performance: Range variable 'f' should be declared as const reference. [iterateByValue]
|
||||
for (auto f : file_list_)
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/asset.cpp:120:35: performance: Function parameter 'path' should be passed by const reference. [passedByValue]
|
||||
bool Asset::checkFile(std::string path) const
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/asset.cpp:123:24: style: Variable 'result' is assigned a value that is never used. [unreadVariable]
|
||||
std::string result = "ERROR";
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/asset.cpp:126:33: 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/asset.cpp:131:16: style: Variable 'result' is assigned a value that is never used. [unreadVariable]
|
||||
result = "OK";
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/background.cpp:14:5: performance: Variable 'buildings_texture_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
|
||||
buildings_texture_ = std::make_shared<Texture>(renderer, Asset::get()->get("game_buildings.png"));
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/background.h:110:3: style: Class 'Background' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
|
||||
Background(SDL_Renderer *renderer);
|
||||
^
|
||||
/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<AnimatedSprite>(texture, "", animation);
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.h:88:10: warning: The class 'AnimatedSprite' defines member function with name 'update' also defined in its parent class 'MovingSprite'. [duplInheritedMember]
|
||||
void update();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:45:10: note: Parent function 'MovingSprite::update'
|
||||
void update();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.h:88:10: note: Derived function 'AnimatedSprite::update'
|
||||
void update();
|
||||
^
|
||||
/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<Sprite>(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> text);
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/smart_sprite.h:35:7: warning: The class 'SmartSprite' defines member function with name 'update' also defined in its parent class 'AnimatedSprite'. [duplInheritedMember]
|
||||
void update();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.h:88:10: note: Parent function 'AnimatedSprite::update'
|
||||
void update();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/smart_sprite.h:35:7: note: Derived function 'SmartSprite::update'
|
||||
void update();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/smart_sprite.h:35:7: warning: The class 'SmartSprite' defines member function with name 'update' also defined in its parent class 'MovingSprite'. [duplInheritedMember]
|
||||
void update();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:45:10: note: Parent function 'MovingSprite::update'
|
||||
void update();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/smart_sprite.h:35:7: note: Derived function 'SmartSprite::update'
|
||||
void update();
|
||||
^
|
||||
/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/smart_sprite.h:26:2: style: Class 'SmartSprite' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
|
||||
SmartSprite(std::shared_ptr<Texture> texture);
|
||||
^
|
||||
/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);
|
||||
^
|
||||
@@ -403,45 +229,27 @@ bool ManageHiScoreTable::saveToFile(std::string file_path)
|
||||
/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:30:2: performance: Variable 'currentFlip_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
|
||||
currentFlip_ = SDL_FLIP_NONE;
|
||||
/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:69:20: warning: The class 'MovingSprite' defines member function with name 'render' also defined in its parent class 'Sprite'. [duplInheritedMember]
|
||||
void MovingSprite::render()
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/sprite.h:30:10: note: Parent function 'Sprite::render'
|
||||
void render();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:69:20: note: Derived function 'MovingSprite::render'
|
||||
void MovingSprite::render()
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:78:21: warning: The class 'MovingSprite' defines member function with name 'getPosX' also defined in its parent class 'Sprite'. [duplInheritedMember]
|
||||
/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:33:9: note: Parent function 'Sprite::getPosX'
|
||||
/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:78:21: note: Derived function 'MovingSprite::getPosX'
|
||||
/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:84:21: warning: The class 'MovingSprite' defines member function with name 'getPosY' also defined in its parent class 'Sprite'. [duplInheritedMember]
|
||||
/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:34:9: note: Parent function 'Sprite::getPosY'
|
||||
/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:84:21: note: Derived function 'MovingSprite::getPosY'
|
||||
/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/moving_sprite.cpp:298:24: warning: The class 'MovingSprite' defines member function with name 'getRect' also defined in its parent class 'Sprite'. [duplInheritedMember]
|
||||
SDL_Rect MovingSprite::getRect()
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/sprite.h:44:14: note: Parent function 'Sprite::getRect'
|
||||
SDL_Rect getRect() const;
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.cpp:298:24: note: Derived function 'MovingSprite::getRect'
|
||||
SDL_Rect MovingSprite::getRect()
|
||||
^
|
||||
/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;
|
||||
^
|
||||
@@ -589,27 +397,6 @@ void Screen::showNotification(std::string text1, std::string text2, int icon)
|
||||
/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/smart_sprite.cpp:26:19: warning: The class 'SmartSprite' defines member function with name 'update' also defined in its parent class 'AnimatedSprite'. [duplInheritedMember]
|
||||
void SmartSprite::update()
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/animated_sprite.h:88:10: note: Parent function 'AnimatedSprite::update'
|
||||
void update();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/smart_sprite.cpp:26:19: note: Derived function 'SmartSprite::update'
|
||||
void SmartSprite::update()
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/smart_sprite.cpp:26:19: warning: The class 'SmartSprite' defines member function with name 'update' also defined in its parent class 'MovingSprite'. [duplInheritedMember]
|
||||
void SmartSprite::update()
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/moving_sprite.h:45:10: note: Parent function 'MovingSprite::update'
|
||||
void update();
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/smart_sprite.cpp:26:19: note: Derived function 'SmartSprite::update'
|
||||
void SmartSprite::update()
|
||||
^
|
||||
/home/sergio/gitea/coffee_crisis_arcade_edition/source/sprite.cpp:8:2: performance: Variable 'spriteClip_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
|
||||
spriteClip_ = {0, 0, w, h};
|
||||
^
|
||||
/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)
|
||||
^
|
||||
|
||||
Reference in New Issue
Block a user