Ja carrega la ultima paleta seleccionada

This commit is contained in:
2025-03-06 14:07:47 +01:00
parent 68e03ac1b0
commit 982db7f75b
5 changed files with 35 additions and 26 deletions

View File

@@ -431,30 +431,20 @@ bool colorAreEqual(Color color1, Color color2)
return (r && g && b);
}
// Convierte una cadena a minúsculas
std::string toLower(std::string str)
// Función para convertir un string a minúsculas
std::string toLower(const std::string &str)
{
for (char &c : str)
{
if (c >= 'A' && c <= 'Z')
{
c += 32; // Convierte a minúscula
}
}
return str;
std::string lower_str = str;
std::transform(lower_str.begin(), lower_str.end(), lower_str.begin(), ::tolower);
return lower_str;
}
// Convierte una cadena a mayúsculas
std::string toUpper(std::string str)
// Función para convertir un string a mayúsculas
std::string toUpper(const std::string &str)
{
for (char &c : str)
{
if (c >= 'a' && c <= 'z')
{
c -= 32; // Convierte a mayúscula
}
}
return str;
std::string upper_str = str;
std::transform(upper_str.begin(), upper_str.end(), upper_str.begin(), ::toupper);
return upper_str;
}
// Obtiene el nombre de un fichero a partir de una ruta completa