Optimitzat el tema de comparacions i asignacions de strings buits. Mes que optimitzat, ara està mes mono

This commit is contained in:
2024-10-13 14:25:05 +02:00
parent ba7c44ad06
commit 46540ad7c3
16 changed files with 47 additions and 53 deletions

View File

@@ -23,7 +23,7 @@ Texture::Texture(SDL_Renderer *renderer, std::string path)
palettes_.clear();
// Carga el fichero en la textura
if (path_ != "")
if (!path_.empty())
{
// Obtiene la extensión
const std::string extension = path_.substr(path_.find_last_of(".") + 1);