clang-tidy modernize
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
#include "sprite.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "texture.h" // Para Texture
|
||||
|
||||
// Constructor
|
||||
Sprite::Sprite(std::shared_ptr<Texture> texture, float pos_x, float pos_y, float width, float height)
|
||||
: texture_(texture),
|
||||
: texture_(std::move(texture)),
|
||||
pos_((SDL_FRect){pos_x, pos_y, width, height}),
|
||||
sprite_clip_((SDL_FRect){0, 0, pos_.w, pos_.h}) {}
|
||||
|
||||
Sprite::Sprite(std::shared_ptr<Texture> texture, SDL_FRect rect)
|
||||
: texture_(texture),
|
||||
: texture_(std::move(texture)),
|
||||
pos_(rect),
|
||||
sprite_clip_((SDL_FRect){0, 0, pos_.w, pos_.h}) {}
|
||||
|
||||
Sprite::Sprite(std::shared_ptr<Texture> texture)
|
||||
: texture_(texture),
|
||||
: texture_(std::move(texture)),
|
||||
pos_(SDL_FRect{0, 0, static_cast<float>(texture_->getWidth()), static_cast<float>(texture_->getHeight())}),
|
||||
sprite_clip_(pos_) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user