Skip to content

Commit

Permalink
Fix narrowing-conversion-warning (#1983)
Browse files Browse the repository at this point in the history
Fixes #1966
  • Loading branch information
dweindl authored Feb 13, 2023
1 parent f909166 commit e51815d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,7 @@ int Model::checkFinite(gsl::span<const realtype> array,
if(hasObservableIds())
row_id += " " + getObservableIds()[row];
if(hasParameterIds())
col_id += " " + getParameterIds()[plist(col)];
col_id += " " + getParameterIds()[plist(gsl::narrow<int>(col))];
break;
case ModelQuantity::dydx:
if(hasObservableIds())
Expand All @@ -1488,7 +1488,7 @@ int Model::checkFinite(gsl::span<const realtype> array,
if(hasStateIds())
row_id += " " + getStateIdsSolver()[row];
if(hasParameterIds())
col_id += " " + getParameterIds()[plist(col)];
col_id += " " + getParameterIds()[plist(gsl::narrow<int>(col))];
break;
case ModelQuantity::dJydy:
case ModelQuantity::dJydy_matlab:
Expand All @@ -1510,7 +1510,7 @@ int Model::checkFinite(gsl::span<const realtype> array,
case ModelQuantity::drzdp:
case ModelQuantity::dsigmazdp:
if(hasParameterIds())
col_id += " " + getParameterIds()[plist(col)];
col_id += " " + getParameterIds()[plist(gsl::narrow<int>(col))];
break;
case ModelQuantity::dsigmaydy:
if(hasObservableIds()) {
Expand Down Expand Up @@ -1610,7 +1610,7 @@ int Model::checkFinite(SUNMatrix m, ModelQuantity model_quantity, realtype t) co
if(hasExpressionIds())
row_id += " " + getExpressionIds()[row];
if(hasParameterIds())
col_id += " " + getParameterIds()[plist(col)];
col_id += " " + getParameterIds()[plist(gsl::narrow<int>(col))];
break;
default:
break;
Expand Down

0 comments on commit e51815d

Please sign in to comment.