Mes recomanacions de cppcheck

This commit is contained in:
2024-10-13 19:26:27 +02:00
parent 46540ad7c3
commit babf02226c
22 changed files with 291 additions and 369 deletions

View File

@@ -39,23 +39,23 @@ private:
void deleteSurface(Surface surface);
// Crea una surface desde un fichero .gif
Surface loadSurface(const char *file_name);
Surface loadSurface(const std::string &file_name);
// Vuelca la surface en la textura
void flipSurface();
// Carga una paleta desde un fichero
std::vector<Uint32> loadPal(const char *file_name);
std::vector<Uint32> loadPal(const std::string &file_name);
public:
// Constructor
explicit Texture(SDL_Renderer *renderer, std::string path = std::string());
explicit Texture(SDL_Renderer *renderer, const std::string &path = std::string());
// Destructor
~Texture();
// Carga una imagen desde un fichero
bool loadFromFile(std::string path);
bool loadFromFile(const std::string &path);
// Crea una textura en blanco
bool createBlank(int width, int height, SDL_PixelFormatEnum format = SDL_PIXELFORMAT_RGBA8888, SDL_TextureAccess = SDL_TEXTUREACCESS_STREAMING);