Mes recomanacions de cppcheck aplicades
Abans de tocar unes cosetes de strings buits
This commit is contained in:
@@ -6,15 +6,14 @@ class Texture;
|
||||
|
||||
// Constructor
|
||||
Item::Item(int kind, float x, float y, SDL_Rect *play_area, std::shared_ptr<Texture> texture, std::vector<std::string> *animation)
|
||||
: kind_(kind), play_area_(play_area)
|
||||
: sprite_(std::make_unique<AnimatedSprite>(texture, "", animation)),
|
||||
accel_x_(0.0f),
|
||||
floor_collision_(false),
|
||||
kind_(kind),
|
||||
enabled_(true),
|
||||
play_area_(play_area),
|
||||
time_to_live_(600)
|
||||
{
|
||||
sprite_ = std::make_unique<AnimatedSprite>(texture, "", animation);
|
||||
|
||||
enabled_ = true;
|
||||
time_to_live_ = 600;
|
||||
accel_x_ = 0.0f;
|
||||
floor_collision_ = false;
|
||||
|
||||
if (kind == ITEM_COFFEE_MACHINE)
|
||||
{
|
||||
width_ = 28;
|
||||
|
||||
Reference in New Issue
Block a user