Skip to content

Commit

Permalink
Maint: avoid copying of return values
Browse files Browse the repository at this point in the history
  • Loading branch information
RDoerfel committed Feb 9, 2022
1 parent 7b2a033 commit a7942d9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libraries/inverse/hpiFit/signalmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ MatrixXd SignalModel::fitData(const HpiModelParameters& hpiModelParameters, cons
{

if(checkEmpty(hpiModelParameters)) {
MatrixXd matTopo;
return matTopo;
return MatrixXd();
}

bool bParametersChanged = m_modelParameters != hpiModelParameters;
Expand All @@ -85,8 +84,7 @@ MatrixXd SignalModel::fitData(const HpiModelParameters& hpiModelParameters, cons
selectModelAndCompute();
}

MatrixXd matTopo = m_matInverseSignalModel * matData.transpose();
return matTopo;
return m_matInverseSignalModel * matData.transpose();
}

//=============================================================================================================
Expand Down

0 comments on commit a7942d9

Please sign in to comment.