passant linters a vore si trobe variables sense inicialitzar

This commit is contained in:
2025-08-17 00:23:59 +02:00
parent ada5025c65
commit 327987447d
55 changed files with 516 additions and 474 deletions

View File

@@ -4,7 +4,8 @@
#include <cstddef> // Para size_t
#include <memory> // Para shared_ptr
#include <vector> // Para vector
#include <utility>
#include <vector> // Para vector
class Texture;
@@ -52,8 +53,8 @@ class Sprite {
// --- Textura ---
[[nodiscard]] auto getTexture() const -> std::shared_ptr<Texture> { return textures_.at(texture_index_); }
void setTexture(std::shared_ptr<Texture> texture) { textures_.at(texture_index_) = texture; }
void addTexture(std::shared_ptr<Texture> texture) { textures_.push_back(texture); }
void setTexture(std::shared_ptr<Texture> texture) { textures_.at(texture_index_) = std::move(texture); }
void addTexture(const std::shared_ptr<Texture>& texture) { textures_.push_back(texture); }
auto setActiveTexture(size_t index) -> bool; // Cambia la textura activa por índice
[[nodiscard]] auto getActiveTextureIndex() const -> size_t { return texture_index_; } // Obtiene el índice de la textura activa
[[nodiscard]] auto getTextureCount() const -> size_t { return textures_.size(); } // Obtiene el número total de texturas