File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
CASAL2/source/AgeLengths/Age Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -118,8 +118,11 @@ void Data::DoBuild() {
118118 << " ages in the model" ;
119119 unsigned year = utilities::ToInline<string, unsigned >(row[0 ]);
120120 // Check year is valid
121- if (find (model_->years ().begin (), model_->years ().end (), year) == model_->years ().end ())
121+ const vector<unsigned >& model_years = model_->years ();
122+ if (find (model_years.begin (), model_years.end (), year) == model_years.end ()) {
122123 LOG_WARNING_P (PARAM_DATA) << " year " << year << " is not in the model run years, so this age length will not be used" ;
124+ continue ;
125+ }
123126
124127 for (unsigned i = 1 ; i < row.size (); ++i) {
125128 data_by_year_[year].push_back (utilities::ToInline<string, Double>(row[i]));
You can’t perform that action at this time.
0 commit comments