Se puede especificar con argumentos el fichero de parametros a utilizar
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user