linter
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
#include "core/rendering/surface_sprite.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
|
||||
// Constructor
|
||||
SurfaceSprite::SurfaceSprite(std::shared_ptr<Surface> surface, float x, float y, float w, float h)
|
||||
: surface_(surface),
|
||||
: surface_(std::move(std::move(surface))),
|
||||
pos_((SDL_FRect){x, y, w, h}),
|
||||
clip_((SDL_FRect){0.0F, 0.0F, pos_.w, pos_.h}) {}
|
||||
|
||||
SurfaceSprite::SurfaceSprite(std::shared_ptr<Surface> surface, SDL_FRect rect)
|
||||
: surface_(surface),
|
||||
: surface_(std::move(std::move(surface))),
|
||||
pos_(rect),
|
||||
clip_((SDL_FRect){0, 0, pos_.w, pos_.h}) {}
|
||||
|
||||
SurfaceSprite::SurfaceSprite(std::shared_ptr<Surface> surface)
|
||||
: surface_(surface),
|
||||
: surface_(std::move(std::move(surface))),
|
||||
pos_((SDL_FRect){0.0F, 0.0F, surface_->getWidth(), surface_->getHeight()}),
|
||||
clip_(pos_) {}
|
||||
|
||||
@@ -41,6 +43,6 @@ void SurfaceSprite::setPosition(SDL_FPoint p) {
|
||||
|
||||
// Reinicia las variables a cero
|
||||
void SurfaceSprite::clear() {
|
||||
pos_ = {0, 0, 0, 0};
|
||||
clip_ = {0, 0, 0, 0};
|
||||
pos_ = {.x = 0, .y = 0, .w = 0, .h = 0};
|
||||
clip_ = {.x = 0, .y = 0, .w = 0, .h = 0};
|
||||
}
|
||||
Reference in New Issue
Block a user