File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -94,12 +94,18 @@ OptimizeParameters::OptimizeParameters(ProjectHandle project) {
9494 Keys::particle_format,
9595 Keys::geodesic_remesh_percent};
9696
97- // check if params_ has any unknown keys
97+ std::vector<std::string> to_remove;
98+
99+ // check if params_ has any unknown keys, and remove
98100 for (auto & param : params_.get_map ()) {
99101 if (std::find (all_params.begin (), all_params.end (), param.first ) == all_params.end ()) {
100102 SW_WARN (" Unknown Optimization parameter: " + param.first );
103+ to_remove.push_back (param.first );
101104 }
102105 }
106+ for (auto & param : to_remove) {
107+ params_.remove_entry (param);
108+ }
103109}
104110
105111// ---------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments