clang-tidy modernize

This commit is contained in:
2025-07-20 12:51:24 +02:00
parent bfda842d3c
commit 1f0184fde2
74 changed files with 658 additions and 665 deletions

View File

@@ -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_) {}