From 69354e0aec0a262ec68a11620dcec18391461ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Fri, 8 Jul 2022 14:52:21 +0200 Subject: [PATCH] More C++20 modernization --- src/ExprNode.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ExprNode.cc b/src/ExprNode.cc index 4a0db3d2..d5268294 100644 --- a/src/ExprNode.cc +++ b/src/ExprNode.cc @@ -7694,8 +7694,8 @@ FirstDerivExternalFunctionNode::writeExternalFunctionOutput(ostream &output, Exp << " prhs[1] = mxCreateDoubleScalar(" << inputIndex << ");"<< endl << " prhs[2] = mxCreateCellArray(2, dims);"<< endl; - int i = 0; - for (auto argument : arguments) + for (int i{0}; + auto argument : arguments) { output << " mxSetCell(prhs[2], " << i++ << ", " << "mxCreateDoubleScalar("; // All external_function arguments are scalars @@ -8038,8 +8038,8 @@ SecondDerivExternalFunctionNode::writeExternalFunctionOutput(ostream &output, Ex << " prhs[2] = mxCreateDoubleScalar(" << inputIndex2 << ");"<< endl << " prhs[3] = mxCreateCellArray(2, dims);"<< endl; - int i = 0; - for (auto argument : arguments) + for (int i{0}; + auto argument : arguments) { output << " mxSetCell(prhs[3], " << i++ << ", " << " mxCreateDoubleScalar("; // All external_function arguments are scalars