Se puede especificar con argumentos el fichero de parametros a utilizar

This commit is contained in:
2024-09-10 10:19:56 +02:00
parent f071b60212
commit 46cdc2189e
5 changed files with 69 additions and 5 deletions

View File

@@ -66,6 +66,10 @@ void loadParamsFromFile(param_t *param, std::string filePath)
// Si el fichero se puede abrir
if (file.good())
{
#ifdef VERBOSE
const std::string filename = filePath.substr(filePath.find_last_of("\\/") + 1);
std::cout << "Reading file: " << filename << std::endl;
#endif
// Procesa cada linea del fichero
while (std::getline(file, line))
{
@@ -136,6 +140,10 @@ void loadParamsFromFile(param_t *param, std::string filePath)
// Cierra el fichero
file.close();
}
#ifdef VERBOSE
else
std::cout << "Failed to load file: " << filePath << std::endl;
#endif
precalculateZones(param);
}