You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
36 lines
1.1 KiB
12 months ago
|
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();
|
||
|
}
|