Pasaeta de cppcheck, ale
This commit is contained in:
@@ -23,7 +23,6 @@ std::shared_ptr<TextFile> loadTextFile(const std::string &file_path)
|
||||
}
|
||||
|
||||
// Abre el fichero para leer los valores
|
||||
const std::string file_name = file_path.substr(file_path.find_last_of("\\/") + 1).c_str();
|
||||
std::ifstream file(file_path);
|
||||
|
||||
if (file.is_open() && file.good())
|
||||
@@ -56,15 +55,15 @@ std::shared_ptr<TextFile> loadTextFile(const std::string &file_path)
|
||||
};
|
||||
|
||||
// Cierra el fichero
|
||||
printWithDots("Text File : ", file_name, "[ LOADED ]");
|
||||
printWithDots("Text File : ", getFileName(file_path), "[ LOADED ]");
|
||||
file.close();
|
||||
}
|
||||
|
||||
// El fichero no se puede abrir
|
||||
else
|
||||
{
|
||||
std::cerr << "Error: Fichero no encontrado " << file_path << std::endl;
|
||||
throw std::runtime_error("Fichero no encontrado: " + file_path);
|
||||
std::cerr << "Error: Fichero no encontrado " << getFileName(file_path) << std::endl;
|
||||
throw std::runtime_error("Fichero no encontrado: " + getFileName(file_path));
|
||||
}
|
||||
|
||||
// Establece las coordenadas para cada caracter ascii de la cadena y su ancho
|
||||
|
||||
Reference in New Issue
Block a user