123456789101112131415161718192021222324252627282930313233343536 |
- diff --git a/src/parameters/persistent.cpp b/src/parameters/persistent.cpp
- index 9a5688a..6a232cd 100644
- --- a/src/parameters/persistent.cpp
- +++ b/src/parameters/persistent.cpp
- @@ -145,9 +145,6 @@ void save_parameters(const char *filename)
-
- // printf("result size is %i, #parameters is %i \n", (int)past_results.size(), (int)all_parameters.parameters.size());
-
- - if (!global_power_valid())
- - return;
- -
- pathname = get_param_directory(filename);
-
- file.open(pathname, ios::out);
- @@ -156,12 +153,15 @@ void save_parameters(const char *filename)
- return;
- }
-
- - map<string, int>::iterator it;
- + if (global_power_valid())
- + {
- + map<string, int>::iterator it;
-
- - for (it = param_index.begin(); it != param_index.end(); it++) {
- - int index;
- - index = it->second;
- - file << it->first << "\t" << setprecision(9) << all_parameters.parameters[index] << "\n";
- + for (it = param_index.begin(); it != param_index.end(); it++) {
- + int index;
- + index = it->second;
- + file << it->first << "\t" << setprecision(9) << all_parameters.parameters[index] << "\n";
- + }
- }
- file.close();
- }
|