7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-20 12:01:41 +00:00

resistance calculator: don't copy function in addSolution() arguments

This commit is contained in:
Fabien Corona 2024-10-17 12:44:29 +02:00
parent f6af29ea89
commit 350352332e

View File

@ -87,8 +87,8 @@ private:
* @param aResultFunc is a function calculating final result (RESISTANCE instance)
* for this combination
*/
void addSolution( double aValue, RESISTANCE *aFound,
std::function<RESISTANCE( RESISTANCE& )> aResultFunc )
void addSolution( double aValue, RESISTANCE* aFound,
std::function<RESISTANCE( RESISTANCE& )>& aResultFunc )
{
double deviation = std::abs( aValue - m_target );
if( deviation < m_best_deviation )